Bug 406948 - [typeinference] String converted to byte[]
Summary: [typeinference] String converted to byte[]
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2013-04-30 15:03 EDT by Boris Brodski CLA
Modified: 2016-09-09 09:18 EDT (History)
1 user (show)

See Also:


Attachments
Sample Project (9.29 KB, application/x-zip-compressed)
2016-09-09 09:18 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Brodski CLA 2013-04-30 15:03:05 EDT
Tested on master brunch (de85546)

Code snippet


class Test {
    def static <T> T foo(Test test, (T) => Boolean lambdaMatcher) {}
    
    def static void bar(String string) {}

    def test() {
        bar(foo [ it?.length > 0 ])  // <== ERROR & WARNING
    }
}



produces:
- ERROR: Type mismatch: cannot convert from String to byte[]
- WARNING: Null-safe feature call of feature with primitive type

In my opinion 'it' should be 'String' and neither warning or error should be issued.
Comment 1 Karsten Thoms CLA 2016-09-09 09:18:11 EDT
Created attachment 264078 [details]
Sample Project

Still an issue with 2.11