Skip to content

Commit

Permalink
fix: Fix assertion on invalid generic operator overloads (AssemblyScr…
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO authored Jun 29, 2021
1 parent a5563f9 commit a7f7226
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3173,6 +3173,10 @@ export class Resolver extends DiagnosticEmitter {
let overloadKind = unchecked(_keys[i]);
let overloadPrototype = assert(overloadPrototypes.get(overloadKind));
assert(overloadKind != OperatorKind.INVALID);
if (overloadPrototype.is(CommonFlags.GENERIC)) {
// Already errored during initialization: AS212: Decorator '@operator' is not valid here
continue;
}
let operatorInstance: Function | null;
if (overloadPrototype.is(CommonFlags.INSTANCE)) {
let boundPrototype = overloadPrototype.toBound(instance);
Expand Down

0 comments on commit a7f7226

Please sign in to comment.