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

Bug 362725

Summary: [Xtend 2.1] can no longer do null check on closure parameter
Product: [Modeling] TMF Reporter: Edwin Park <esp1>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sven.efftinge: juno+
Target Milestone: M4   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Edwin Park CLA 2011-11-02 17:04:20 EDT
Build Identifier: 20110916-0149

I have a function that takes a closure argument and then checks to see if it is null:

def String function(Expression e, (String) => String closure) {
  ...
  if (closure != null)
  ...
}

The ==, != comparisons used to work in Xtext 2, but with 2.1 they now give me "Could not resolve reference to JVMIdentifiableElement '!='" errors in the Xtend editor.


Reproducible: Always

Steps to Reproduce:
1. Create an Xtend function with a closure parameter
2. Attempt to check if that closure parameter is null (closure == null, closure != null)
3. Note that the Xtend editor will give an error and the corresponding Java class will not be generated
Comment 1 Sebastian Zarnekow CLA 2011-11-21 17:08:25 EST
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 16:59:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:11:01 EDT
Closing all bugs that were set to RESOLVED before Neon.0