Open trilis opened 3 years ago
Minimal non-stdlib example:
declare interface A<T> {}
declare interface AConstructor {
new(): A<any>;
}
declare var A: AConstructor;
declare class B extends A {}
Looks like currently we can't generate nothing better than
typealias Table = Array<Any>
But at least it won't crash.
See https://github.com/microsoft/TypeScript/blob/master/lib/lib.es2015.collection.d.ts for other examples.
Minimal example:
Because
Array
is known to have one type parameter, there will be generated following declaration insidelib.es5.kt
:Which will predictably lead to Stack Overflow when executing
getAllParents
for this declaration. We shouldn't treatArray
without type parameters this way, but work with it according to itslib.es5.d.ts
specification:This seems to be the root cause for #234 and #322