lately I found out that Fantom produces rather strange errors when using Map as an interface type. Unlike specifying the direct [KeyType:ValueType] using just Map can throw a runtime error because the runtime can't infer types used.
I don't think it should result into a runtime error. There is no reason making it a compile error either (a breaking change). The best solution seems to be let the compiler infer the type sys::Obj. Then it would behave as expected.
katox Mon 1 Apr 2013
Hey,
lately I found out that Fantom produces rather strange errors when using Map as an interface type. Unlike specifying the direct
[KeyType:ValueType]
using justMap
can throw a runtime error because the runtime can't infer types used.I don't think it should result into a runtime error. There is no reason making it a compile error either (a breaking change). The best solution seems to be let the compiler infer the type
sys::Obj
. Then it would behave as expected.brian Mon 1 Apr 2013
Promoted to ticket #2121 and assigned to brian
brian Mon 20 May 2013
Ticket resolved in 1.0.65