use gc interface directly, document

This commit is contained in:
dcode
2019-03-26 23:35:08 +01:00
parent 7c0dc66849
commit 3146f8f9e0
95 changed files with 17360 additions and 13504 deletions

View File

@ -212,7 +212,9 @@ export class Type {
var targetFunction: Signature | null;
if (this.is(TypeFlags.REFERENCE)) {
if (target.is(TypeFlags.REFERENCE)) {
if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) {
// FIXME: turned out resolveType didn't handle nullability properly, and fixing it there
// leads to this check failing all over the place due to not yet implemented null states.
// if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) {
if (currentClass = this.classReference) {
if (targetClass = target.classReference) {
return currentClass.isAssignableTo(targetClass);
@ -222,7 +224,7 @@ export class Type {
return currentFunction.isAssignableTo(targetFunction);
}
}
}
// }
}
} else if (!target.is(TypeFlags.REFERENCE)) {
if (this.is(TypeFlags.INTEGER)) {