Skip to content

Missing sources for type annotations trip the compiler #10020

@zbynek

Description

@zbynek

GWT version: 2.11
Browser (with version): any
Operating System: Windows


Description

Some usages of annotations lead to missing source errrors.

Steps to reproduce

Usecase 1)

  • Add jsinterop 1.0.2 to your project
  • Compile with GWT 2.11
[ERROR] Errors in 'jar:file:/.../base-1.0.2.jar!/jsinterop/base/Js.java'
         [ERROR] Line 140: Nullable cannot be resolved to a type

Usecase 2
Same issue also reproducible with j2objc annotations 2.8, depending on placement. Annotating a field is OK

@WeakOuter Object foo = new Object();

Annotating an anonymous class is not

foo =  new @WeakOuter Object() {
   @Override
   public String toString() {
      return "Foo";
   }
}
Known workarounds
  • Include all annotation sources
Links to further discussions

google/jsinterop-base#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions