Skip to content

generate null instanceof function #2660

@HerrCai0907

Description

@HerrCai0907

Bug description

instanceof function only contain unreachable instruction

 (func $~instanceof|assembly/index/B1 (param $0 i32) (result i32)
  unreachable
 )

Steps to reproduce

class A {
  foo(): void {}
}
let a: A = new A();
class B1 extends A {
  foo(): void {
    if (a instanceof B1) {
    }
  }
}

let b = new B1();
(b as A).foo();

AssemblyScript version

0.27.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions