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
// Annot.javapackagefoo;
importjava.lang.annotation.*;
public @interface Annot {}
compiles with:
-- [E006] UnboundIdentifierError: local/test.scala ---------------------------4|@Annotdeffoo= ()
|^^^^^| not found: typeAnnot
longer explanation available when compiling with`-explain`--Error: local/test.scala -----------------------------------------------------2|importfoo.Annot|^^^|=>Unit(Foo.this.foo) is not stable
whereas:
importfoo.AnnotclassFoo {
@Annotdeffoo= ()
}
Compiles just fine.
The text was updated successfully, but these errors were encountered:
This one might be unavoidable. Annotations in dotty have semantic meaning - they can rewrite the tree they annotate. This means we need to know what they are beforehand. There's an intricate dance when to look at what, which is unfortunately incompatible with the use pattern shown here.
Uh oh!
There was an error while loading. Please reload this page.
compiles with:
whereas:
Compiles just fine.
The text was updated successfully, but these errors were encountered: