kernel icon indicating copy to clipboard operation
kernel copied to clipboard

dynamic/malformed type parameter bound

Open mkustermann opened this issue 9 years ago • 1 comments

Currently dartk translates

class Foo<A,
          B extends Object,
          C extends dynamic,
          D extends X,
          E extends List<int, int>> {
}

to

class Foo<A extends core::Object,
          B extends core::Object,
          C extends dynamic,
          D extends invalid-type,
          E extends core::List<dynamic>> extends core::Object {
    constructor •() → void : super core::Object::•();
}

The VM has logic to convert dynamic/malformed type parameter bounds to Object.

@asgerf Should this be handled in the frontend?

mkustermann avatar Nov 02 '16 16:11 mkustermann

Yes, I think malformed typed should be handled in the frontend, but it doesn't try very hard at the moment.

Whether List<int, int> should become List or just Object I'm not sure, but I think the frontend be responsible for it.

asgerf avatar Nov 02 '16 17:11 asgerf