Properly handle 'void' return type when checking signature compatibility

This commit is contained in:
dcodeIO
2018-03-21 01:16:46 +01:00
parent 477669d7a3
commit 8c1847b316
8 changed files with 62 additions and 23 deletions

View File

@ -539,7 +539,9 @@ export class Signature {
}
// check return type
return this.returnType.isAssignableTo(target.returnType);
var thisReturnType = this.returnType;
var targetReturnType = target.returnType;
return thisReturnType == targetReturnType || this.returnType.isAssignableTo(target.returnType);
}
/** Converts this signature to a function type string. */