Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364811

Summary: [Documentation] Outdated syntax in function definition example
Product: [Modeling] TMF Reporter: Nikolai Busse <nikolai.busse>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sven.efftinge: juno+
Target Milestone: M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nikolai Busse CLA 2011-11-25 05:41:55 EST
Build Identifier: Xtext 2.1 Documentation, October 31, 2011

In the Xtext 2.0/2.1 Documentation, chapter 12.2.5/13.2.5 about Functions, there is the example function definition in old Xtend 1.0 style
    def boolean equalsIgnoreCase(String s1, String s2) :
        s1.toLowerCase() == s2.toLowerCase();
But this example is not accepted by the Xtend parser, it complains
"mismatched input ':' expecting '}'"

Reproducible: Always

Steps to Reproduce:
1. Open the document
2. Copy&Paste the function definition into a *.xtend file
3. See the error raised by the compiler
Comment 1 Sebastian Zarnekow CLA 2011-12-06 17:50:44 EST
Fixed in master branch.
Comment 2 Karsten Thoms CLA 2017-09-19 17:48:07 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:59:14 EDT
Closing all bugs that were set to RESOLVED before Neon.0