mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
Fix local type being possibly null
This commit is contained in:
parent
8d894d0827
commit
2f12c7fa50
@ -1485,7 +1485,8 @@ export class Function extends Element {
|
||||
/** Frees the temporary local for reuse. */
|
||||
freeTempLocal(local: Local): void {
|
||||
var temps: Local[];
|
||||
switch (local.type.toNativeType()) {
|
||||
assert(local.type != null);
|
||||
switch ((<Type>local.type).toNativeType()) {
|
||||
case NativeType.I32: temps = this.tempI32s || (this.tempI32s = []); break;
|
||||
case NativeType.I64: temps = this.tempI64s || (this.tempI64s = []); break;
|
||||
case NativeType.F32: temps = this.tempF32s || (this.tempF32s = []); break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user