mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
JS: fix instanceof T[], where T is non-primitive type
This commit is contained in:
parent
e16ba8a6ca
commit
dcd1f64c81
|
@ -33,6 +33,9 @@ function $rt_isAssignable(from, to) {
|
||||||
if (from === to) {
|
if (from === to) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (to.$meta.item !== null) {
|
||||||
|
return from.$meta.item !== null && $rt_isAssignable(from.$meta.item, to.$meta.item);
|
||||||
|
}
|
||||||
var supertypes = from.$meta.supertypes;
|
var supertypes = from.$meta.supertypes;
|
||||||
for (var i = 0; i < supertypes.length; i = (i + 1) | 0) {
|
for (var i = 0; i < supertypes.length; i = (i + 1) | 0) {
|
||||||
if ($rt_isAssignable(supertypes[i], to)) {
|
if ($rt_isAssignable(supertypes[i], to)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user