Closed
Description
// Foo.scala
class Foo {
import foo.Annot
@Annot def foo = ()
}
// Annot.java
package foo;
import java.lang.annotation.*;
public @interface Annot {}
compiles with:
-- [E006] Unbound Identifier Error: local/test.scala ---------------------------
4 | @Annot def foo = ()
| ^^^^^
| not found: type Annot
longer explanation available when compiling with `-explain`
-- Error: local/test.scala -----------------------------------------------------
2 | import foo.Annot
| ^^^
| => Unit(Foo.this.foo) is not stable
whereas:
import foo.Annot
class Foo {
@Annot def foo = ()
}
Compiles just fine.