Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342274 - [Xbase] Handle raw types gracefully
Summary: [Xbase] Handle raw types gracefully
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 08:23 EDT by Robert von Massow CLA
Modified: 2017-09-19 18:15 EDT (History)
2 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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