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

Bug 342274

Summary: [Xbase] Handle raw types gracefully
Product: [Modeling] TMF Reporter: Robert von Massow <rvonmassow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Robert von Massow CLA 2011-04-08 08:23:44 EDT
Build Identifier: 2.0.0.v201104080435

There is currently no suitable validation for missing type parameters. The validation should be the same as for the parameter ?. 

Reproducible: Always
Comment 1 Sven Efftinge CLA 2011-04-08 08:29:41 EDT
for a cast expression like :

null as Iterable

the compilation is silently broken.
Xbase should fill up missing type arguments with wildcards.
Comment 2 Sebastian Zarnekow CLA 2011-05-04 06:11:38 EDT
Preliminary scheduled for 2.0RC1
Comment 3 Sven Efftinge CLA 2011-05-04 09:59:08 EDT
postponed to SR1
Comment 4 Sebastian Zarnekow CLA 2011-09-28 09:54:35 EDT
Pushed to master.

(In reply to comment #1)
> for a cast expression like :
> 
> null as Iterable
> 
> the compilation is silently broken.

The following test compiles and executes without errors:

def void castNull() {
  var raw = null as Iterable
  var strings = null as Iterable<String>
  var Iterable assignStringsToRaw = null as Iterable<String>
  var Iterable<String> assignRawToStrings = null as Iterable
  var Iterable assignRawToRaw = null as Iterable
  var Iterable<String> assignStringsToStrings = null as Iterable<String>
  if (raw != strings)
    throw new IllegalStateException()
}

Please reopen if I missed the point of this issue.
Comment 5 Karsten Thoms CLA 2017-09-19 18:05:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 18:15:37 EDT
Closing all bugs that were set to RESOLVED before Neon.0