mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 10:16:37 +00:00
Properly handle 'void' return type when checking signature compatibility
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user