Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361782 - [xtend] Cannot add dispatch case and throw plain runtime exception
Summary: [xtend] Cannot add dispatch case and throw plain runtime exception
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 361780 (view as bug list)
Depends on: 376037
Blocks:
  Show dependency tree
 
Reported: 2011-10-24 05:30 EDT by Sebastian Zarnekow CLA
Modified: 2017-10-31 11:24 EDT (History)
2 users (show)

See Also:
sven.efftinge: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Zarnekow CLA 2011-10-24 05:30:02 EDT
Try to implement a custom type provider with xtend:

def dispatch type(XBinaryOperation bo, JvmTypeReference r, boolean b) {
	throw new RuntimeException("This is expected")
}

leads to the following error:

Incompatible return type of dispatch method. Expected org.eclipse.xtext.common.types.JvmTypeReference but was void
Comment 1 Sebastian Zarnekow CLA 2012-04-04 03:47:31 EDT
*** Bug 361780 has been marked as a duplicate of this bug. ***
Comment 2 Dennis Huebner CLA 2013-02-13 05:41:34 EST
Works like a charm with the new TS
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:24:37 EDT
Requested via bug 522520.

-M.