Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361782

Summary: [xtend] Cannot add dispatch case and throw plain runtime exception
Product: [Tools] Xtend Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dennis.huebner, sven.efftinge
Version: 2.2.0Flags: sven.efftinge: kepler+
Target Milestone: M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 376037    
Bug Blocks:    

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.