Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365074 - [Xtend] static methods may not call instance extension methods
Summary: [Xtend] static methods may not call instance extension methods
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.2.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Moritz Eysholdt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 10:25 EST by Holger Schill CLA
Modified: 2017-09-19 17:42 EDT (History)
1 user (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schill CLA 2011-11-29 10:25:28 EST
Steps to reproduce:

class Foo { 
  	extension Test a
	def static bar(){
		"42".foo
	}
}

If the class Test has a non static method foo(String a) the code above will lead to the following invalid java:

@SuppressWarnings("all")
public class Foo {
  private Test a;
  
  public static String bar() {
    String _foo = this.a.foo("42");
    return _foo;
  }
}
Comment 1 Holger Schill CLA 2011-11-29 10:36:57 EST
There is also contentAssist for this.
Comment 2 Moritz Eysholdt CLA 2011-12-01 06:12:57 EST
fixed. pushed to 'master'.
Comment 3 Karsten Thoms CLA 2017-09-19 17:31:20 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:42:30 EDT
Closing all bugs that were set to RESOLVED before Neon.0