Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345433 - [xtend] problem with type inference
Summary: [xtend] problem with type inference
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 10:45 EDT by Moritz Eysholdt CLA
Modified: 2017-09-19 17:29 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-05-11 10:45:47 EDT
the type of 

---
def unassignedCalledTokenRules() {
  grammar.containedRuleCalls.filter(e | !e.isAssigned() && !e.isEObjectRuleCall()).map(e | e.rule)
}
---

is resolved to Iterable<void>. It should be Iterable<AbstractRule>.

containedRuleCalls(), isAssigned() and isEObjectRuleCall() are imported via
import static extension org.eclipse.xtext.GrammarUtil.*
Comment 1 Jan Koehnlein CLA 2011-07-06 11:40:03 EDT
The type of e in the closure passed to the map cannot be resolved during linking (cannot resovlve reference to JvmIdentibiable element 'rule'), but is resolved later (hover shows correct type).
Comment 2 Sebastian Zarnekow CLA 2011-07-13 05:59:34 EDT
Added greenish tests org.eclipse.xtext.xtend2.tests.linking.LinkingTest.testBug345433*().
Comment 3 Karsten Thoms CLA 2017-09-19 17:17:40 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:29:00 EDT
Closing all bugs that were set to RESOLVED before Neon.0