Bug 432836 - [xbase][typesystem] bounded type parameter substitution is not validated
Summary: [xbase][typesystem] bounded type parameter substitution is not validated
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 10:50 EDT by Lorenzo Bettini CLA
Modified: 2014-04-15 10:50 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Bettini CLA 2014-04-15 10:50:43 EDT
Xbase class JvmTypeReferencesValidator does not check whether a type argument can be assigned to a bounded type parameter; this can be seen also in Xtend, for instance

interface CInterface {}
interface MyInterface<T extends CInterface> {}
class MyXtendClass implements MyInterface<String> {...

should generate a validation error, while it generates Java code that does not compile:

The type String is not a valid substitute for the bounded parameter <T extends CInterface> of the type MyInterface<T>