Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364811 - [Documentation] Outdated syntax in function definition example
Summary: [Documentation] Outdated syntax in function definition example
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-25 05:41 EST by Nikolai Busse CLA
Modified: 2017-09-19 17:59 EDT (History)
2 users (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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