We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4abdd8 commit 62d00e6Copy full SHA for 62d00e6
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -48,7 +48,6 @@ trait NamerContextOps { this: Context =>
48
val elem = scope.lastEntry
49
if (elem.name == name) return elem.sym.denot // return self
50
}
51
- assert(scope.size <= 1, scope)
52
owner.thisType.member(name)
53
54
else // we are in the outermost context belonging to a class; self is invisible here. See inClassContext.
tests/neg/i3702.scala
@@ -0,0 +1,8 @@
1
+object test {
2
+ class annot extends scala.annotation.Annotation
3
+ def foo = {
4
+ def bar(i: Int): Int = i
5
+ @annot class Silly {}
6
+ bar(5)
7
+ }
8
+}
0 commit comments