| Summary: | [doc] Syntax for create functions is not correct | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Karsten Thoms <karsten.thoms> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.0.0 | Flags: | sven.efftinge:
indigo+
|
| Target Milestone: | RC1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
doc has already been updated Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
In the Xbase and Xtend doc it is not mentioned that the return type must be named and a colon is required. def create new Person() copy(Person p) { name = p.name // now it works friendWith = p.friendWith.map( p | p.copy ) marriedWith = p.marriedWith.map( p | p.copy ) } => def create target : new Person() copy(Person p) { target.name = p.name // now it works target.friendWith = p.friendWith.map( p | p.copy ) target.marriedWith = p.marriedWith.map( p | p.copy ) }