Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341909 - [xbase][common.types] JvmSynonymTypeReference could be useful
Summary: [xbase][common.types] JvmSynonymTypeReference could be useful
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 376037
Blocks:
  Show dependency tree
 
Reported: 2011-04-05 09:50 EDT by Sebastian Zarnekow CLA
Modified: 2017-10-31 11:18 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Zarnekow CLA 2011-04-05 09:50:22 EDT
Usecases: Expected type in a for loop is either Iterable or an array. We cannot use MultiTypeReferences for this usecase as that would imply that the expected type is both an iterable and an array.

Other opportunities:
A string literal '123' could be either a String or a Number.
'c' could either be a String or a character.

IntegerLiteral 12345 could be Integer, Long, Short (but not byte since it is to big) as well as BigInteger or BigDecimal.

The type provider could return synonym type references for operations that return e.g. an array or a list. 

SynonymTypeReferences could have a primary type and a number of synonyms.
Comment 1 Sebastian Zarnekow CLA 2013-03-12 15:03:28 EDT
We already have something like a synonym type reference and it turned out to be only of limited value. In most cases we know which type was expected and therefore I don't see much benefit in enhancing the existing concepts further. Marked as resolved.
Comment 2 Eclipse Webmaster CLA 2017-10-31 11:07:26 EDT
Requested via bug 522520.

-M.
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:18:51 EDT
Requested via bug 522520.

-M.