Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358118 - NPE in Xbase compiler for method with inferred return type and recursive method call
Summary: NPE in Xbase compiler for method with inferred return type and recursive meth...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 09:51 EDT by Christian Weisskopf CLA
Modified: 2017-09-19 18:00 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
Xtend class (786 bytes, text/plain)
2011-09-19 09:52 EDT, Christian Weisskopf CLA
no flags Details
Stack trace (3.61 KB, text/plain)
2011-09-19 09:53 EDT, Christian Weisskopf CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Weisskopf CLA 2011-09-19 09:51:20 EDT
Build Identifier: 2.0.1.v201108020636

The attached Xtend class (using the Xtend tutorial project) does not compile to java due to a NPE thrown in the Xtend/Xbase compiler. The call hierarchy to reproduce the error is as follows:

- recursiveMethod (Return type declared)
  - method1 (Return type declared)
    - method2 (No return type declared)
      - recursiveMethod (Return type declared)

The circumstances are very specific and in any of the following cases, no NPE is thrown:

- In case of a declared return type for method2
- In case of a direct call to method2 from the recursiveMethod
- In case of no call to recusriveMethod in method2

See the attached files for more details and the stack trace.

Reproducible: Always

Steps to Reproduce:
1. Import the Xtend tutorial project
2. Copy the attached Xtend class in to the xtend.tutorial.basics package
3. Check the Eclipse .log-file for an NPE
Comment 1 Christian Weisskopf CLA 2011-09-19 09:52:48 EDT
Created attachment 203590 [details]
Xtend class
Comment 2 Christian Weisskopf CLA 2011-09-19 09:53:41 EDT
Created attachment 203591 [details]
Stack trace
Comment 3 Sebastian Zarnekow CLA 2011-09-29 10:01:08 EDT
Pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 17:49:35 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:00:37 EDT
Closing all bugs that were set to RESOLVED before Neon.0