Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for _root_ package syntax #958

Closed
sfiruch opened this issue Mar 30, 2021 · 2 comments
Closed

Add support for _root_ package syntax #958

sfiruch opened this issue Mar 30, 2021 · 2 comments

Comments

@sfiruch
Copy link
Contributor

sfiruch commented Mar 30, 2021

Scala uses _root_ to mark the start of the namespace:
https://docs.scala-lang.org/style/naming-conventions.html#root

Stainless stumbles over it with the following error message: _root_ cannot be imported

@jad-hamza
Copy link
Contributor

I think the error message comes from the Scala compiler (for instance it appears in scala/bug#6217 and scala/bug#9125)

Could you try running scalac on your example as shown here: https://epfl-lara.github.io/stainless/installation.html#running-code-with-stainless-dependencies

scalac -d ~/.scala_objects $(find /path/to/Stainless/frontends/library/stainless/ -name "*.scala") File1.scala ... File_n.scala

@sfiruch
Copy link
Contributor Author

sfiruch commented Mar 30, 2021

My bad. You can't actually import things from the root namespace directly in scala. Sorry :)

@sfiruch sfiruch closed this as completed Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants