| Summary: | Can't invoke the static methods of other classes | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Lipeng Mising name <nowind_lee> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nowind_lee, sebastian.zarnekow |
| Version: | 2.2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
How did you try to invoke that method? Btw: the expected invocation syntax would be A::hello ---
class Bar {
def static hello() {}
}
---
invoked by
---
class Foo {
def foo() {
Bar::hello()
}
}
---
works for me.
|
Build Identifier: I downloaded the lastest xtext 2.2.x, found it support support static methods now. So I can define a class like: class A { def static hello() {} } But I can't invoke this static method from another class! It reports: Couldn't resolve reference to JvmIdentifiableElement 'hello'. Couldn't resolve reference to JvmIdentifiableElement 'A'. And it can't invoke a static method in a Java class. Reproducible: Always