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

Bug 367843

Summary: [Xbase] check instanceof expression
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.2.1Flags: sven.efftinge: juno+
Target Milestone: M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sven Efftinge CLA 2012-01-04 08:25:52 EST
The instanceof expression must be validated to not use any primitives. 
Also the type on the left and the right should be validated like in Java (incompatible conditional operands).
Finally no conversion rules should be respected. That is

[| 'foo' ] instanceof Supplier<String> 

is *false* as well as

newArrayList('foo','bar') instanceof String[]
Comment 1 Sven Efftinge CLA 2012-01-04 08:27:21 EST
Array types should be allowed in instanceof expressions.
Comment 2 Sebastian Zarnekow CLA 2012-01-05 09:38:40 EST
In Java it's ok to check 

variable instanceof List<?>

I think Xtend should allow that, too
Comment 3 Sven Efftinge CLA 2012-01-05 11:24:21 EST
pushed to master
Comment 4 Karsten Thoms CLA 2017-09-19 17:51:59 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:02:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0