| Summary: | [Xtend/Xbase] Null save operator does not work correctly with extension methods | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Robert von Massow <rvonmassow> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow, sven.efftinge |
| Version: | 2.0.0 | Flags: | sven.efftinge:
indigo+
|
| Target Milestone: | SR2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
It's not the rich string context but the use of an extension method which is not working. IIRC this one was already fixed. Please reopen if the problem persists. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: N201105160657 Using the null save operator in a rich string like this: def specialGenCode(CodeBlock block) { if(block.inline) '''\lstinline«block.language?.langSpec»°«block.contents.map([e|e.genCode]).join»°''' } results in the following Java code (just pasing the important part): StringConcatenation _langSpec = this==null?(StringConcatenation)null:this.langSpec(_language); Instead of this block.language should be tested for null Reproducible: Always