mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-07 18:41:55 +00:00
Minor cleanup
This commit is contained in:
@ -4976,7 +4976,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
let classType = contextualType.classReference;
|
||||
if (
|
||||
classType &&
|
||||
classType.prototype == this.program.elementsLookup.get("Array")
|
||||
classType.prototype == this.program.arrayPrototype
|
||||
) {
|
||||
return this.compileStaticArray(
|
||||
assert(classType.typeArguments)[0],
|
||||
@ -5137,7 +5137,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
var module = this.module;
|
||||
|
||||
// obtain the array type
|
||||
var arrayPrototype = assert(this.program.elementsLookup.get("Array"));
|
||||
var arrayPrototype = assert(this.program.arrayPrototype);
|
||||
if (!arrayPrototype || arrayPrototype.kind != ElementKind.CLASS_PROTOTYPE) return module.createUnreachable();
|
||||
var arrayType = (<ClassPrototype>arrayPrototype).resolve([ elementType ]);
|
||||
if (!arrayType) return module.createUnreachable();
|
||||
|
Reference in New Issue
Block a user