| Summary: | [Xtend] support for field initializers | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.1.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M4 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Sven Efftinge
The syntax is going to be just like in Java, with the difference that you can write anything there because in Xtend statements doesn't exist:
class MyClass {
String name = "Horst"
String greeting = "Hello "+name
}
Type inference for fields would be syntactically ambigious: extension TypeName typeNameOrFieldName = "initialValue" vs extension TypeName typeNameOrFieldName = "initialValue" thus I'll use a mandatory type for now: extension TypeName TypeName typeNameOrFieldName = "initialValue" Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |