We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.6.3
Macros inside an object cannot access methods inherited by the object without calling the object itself.
import scala.quoted.* trait Foo: def inherited = () object Bar extends Foo: def local = () def macro1(using Quotes): Expr[Unit] = '{ local } // Ok def macro2(using Quotes): Expr[Unit] = '{ Bar.inherited } // Ok def macro3(using Quotes): Expr[Unit] = '{ inherited } // Error
access to object Bar from wrong staging level: - the definition is at level 0, - but the access is at level 1.
This should work.
The text was updated successfully, but these errors were encountered:
@t9dupuy The original repro was missing import scala.quoted.*, I edited the original post.
import scala.quoted.*
Sorry, something went wrong.
this
3ae11ab
jchyb
Successfully merging a pull request may close this issue.
Compiler version
3.6.3
Minimized code
Macros inside an object cannot access methods inherited by the object without calling the object itself.
Output
Expectation
This should work.
The text was updated successfully, but these errors were encountered: