Skip to content

Fix level checking for this.type in macros #5072

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

Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki
Copy link
Contributor Author

@biboudis do not forget to review this PR.

@nicolasstucki nicolasstucki force-pushed the fix-this-and-param-level-check branch from 6e84a4f to 36a0340 Compare September 21, 2018 11:59
@biboudis
Copy link
Contributor

biboudis commented Oct 2, 2018

I think it is ok related to this.

What do you think about the following? Should I open a separate issue?

import scala.quoted._

object Test{
  class Foo {
    def a: Expr[Foo] = '(new Foo) // OK
  }

  class Outer {
    class Inner{
      def b: Expr[Inner] = '(new Inner) // error: access to Outer.this from wrong staging level
    }
  }
}

@biboudis biboudis merged commit 466bdb8 into scala:master Oct 2, 2018
@allanrenucci allanrenucci deleted the fix-this-and-param-level-check branch October 2, 2018 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants