Skip to content

Cyclic error involving annotation #4758

Closed
@allanrenucci

Description

@allanrenucci

In a file Test1.scala:

package foo.bar

class Bar extends annotation.StaticAnnotation

In a file Test2.scala:

package foo

import foo.bar.Bar

@Bar
class Foo extends annotation.StaticAnnotation

In a file Test3.scala:

package object foo {
  @Foo class Hello
}
dotc Test1.scala Test2.scala Test3.scala
-- Warning: Test2.scala:5:1 ----------------------------------------
5 |@Bar
  | ^^^
  | cyclic import foo.bar.Bar, ignored
-- [E006] Unbound Identifier Error: Test2.scala:5:1 ----------------
5 |@Bar
  | ^^^
  | not found: type Bar

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions