Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341642 - [Xbase] Passing complex boolean expressions to Xbase filter method
Summary: [Xbase] Passing complex boolean expressions to Xbase filter method
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-01 11:27 EDT by Maxim Frolov CLA
Modified: 2017-09-19 17:28 EDT (History)
4 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Frolov CLA 2011-04-01 11:27:36 EDT
Build Identifier: I20110310-1119

Passing complex boolean expressions as argument to the find method of org.eclipse.xtext.xbase.lib.IterableExtensions seems to be not working in a Xtend file:

newArrayList("a", "b", "c").filter(a|a == "a" || a == "b")

The Xtext editor shows the following error:
"Invalid argument types. Expected (boolean, boolean) but got (boolean, boolean)"

In (predecessor) Xtend the complex boolean expressions were allowed in such kind of functions (e.g. in select).

Reproducible: Always
Comment 1 Sven Efftinge CLA 2011-04-04 02:52:29 EDT
The issue was caused by a link resolution deep within another link resolution.
And in that context the type of 'a' couldn't be resolved. So the issue 'INVALID_ARGUMENT_TYPES' was stored with the feature call. Later when the message is computed the types are there because we are no longer deep in a recursive linking situation.

I've fixed this by replacing the INVALID_ARGUMENT_TYPES (which is something done during linking) validation with the regular INCOMPATIBLE_TYPES (which is done after linking) validation.
Although it works and it is not a too ugly fix, it would be more reliable if we could find a way to avoid persistent resolution of proxies while resolving another proxy, such that each proxy is resolved in a clean context and not done as a side effect to other resolutions.
Comment 2 Karsten Thoms CLA 2017-09-19 17:17:04 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:28:25 EDT
Closing all bugs that were set to RESOLVED before Neon.0