Bug 477655 - [aa] @Accessors fails with anonymous class and non-default constructor
Summary: [aa] @Accessors fails with anonymous class and non-default constructor
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.8.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-17 03:15 EDT by Jan Koehnlein CLA
Modified: 2015-09-17 03:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Koehnlein CLA 2015-09-17 03:15:43 EDT
The following does not compile

class Bar {
  new(String b) {}
  def bar() {}
}

class Foo {
  // Java problem: __Foo_1 cannot be resolved to a type
  @Accessors     
  val bar = new Bar('') {
    override bar() {
    }
  }
}

Seems like type inference yields a new synthetic Java type as return type for the getter. It works if a default constructor is used.