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
Error type sneaks into annotation arguments #5892
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5892?orig=1 |
@retronym said: scala> @foo({println("foo"); ""}) def blerg {}
blerg: Unit |
@retronym said: |
@retronym said: A more conservative fix would be ensure that the implicit members of a class are not visible when typing annotations of class type/value parameters. |
@lrytz said: |
@retronym said (edited on Jun 7, 2012 7:54:32 AM UTC): We just have to prevent cyclic inheritance. I haven't extracted a small test case to demonstrate this yet, but you can see it with this branch of Scalala [1]. This is raised as a type error, and not caught by the But the root problem seems to be incorrect scoping -- class annot(a: String) extends StaticAnnotation
class A[@annot(false) X] {
implicit def b2s(b: Boolean): String = ""
} I tried to set [1] https://github.com/retronym/Scalala/tree/d6fccf4bfeb55cb931499098b8047a25ca8b16a5 |
@hubertp said: I will have a look at this bug if you are not in a hurry. |
@retronym said: |
@retronym said: |
@adriaanm said: |
@lrytz said: |
Views should not be allowed when typing the arguments of annotations.
This is one way the problem manifests:
The text was updated successfully, but these errors were encountered: