Community
Participate
Working Groups
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
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.
Closing all bugs that were set to RESOLVED before Neon.0