Generated Java code error

25 views
Skip to first unread message

Typhoon Storm

unread,
Mar 25, 2014, 11:17:55 AM3/25/14
to xtend...@googlegroups.com
Hi, 
    I found a case that xtend code is OK but generated Java code has compile error:

class Foo {
    def test() {
        newTreeMap(null) as Map<String, Object>
    }
}

-------------------------- generates:

public class Foo {
  public Map<String,Object> test() {
    TreeMap<Object,Object> _newTreeMap = CollectionLiterals.<Object, Object>newTreeMap(null);
    return ((Map<String,Object>) _newTreeMap); // <------ Cannot convert from TreeMap<Object, Object> to Map<String, Object>
  }
}


Sven Efftinge

unread,
Mar 25, 2014, 11:50:51 AM3/25/14
to xtend...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages