You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously the method `typedAheadAnnotation` is never called,
which results in retyping of annotations when type checking
a class.
The problem is exhibited in the test tests/pos/t7426.scala:
class foo(x: Any) extends annotation.StaticAnnotation
@foo(new AnyRef { }) trait A
Retype checking the annotation would resulting in entering
the same symbol for the annonymous class twice.
Previously, it does not cause problem, because we use
an incorrect context for typeAhead checking the annotation,
where the symbol is incorrectly entered in the class `A`.
In the typer, a duplicate symbol is entered in the empty
package, thus there is no conflict.
Since we never check that a class member has a corresponding
tree, the bug is thus hidden.
0 commit comments