Skip to content

Strange unreachable error when mixing base class with other classes w/ function override. #1536

Closed
@AfflatusX

Description

@AfflatusX

It's hard to describe the issue... so I created a repro here: https://webassembly.studio/?f=025lli7p08dc

The bug requires following conditions to be met:

  1. a base class type needs to be used when creating the instance. In the example, that's line 38. If we create concrete class type, no exception.
  2. we need 2 separate classes, where one inherit another. Base should have a virtual function defined, and Child should overload that. See line 11 and line 1.
  3. invoke the function from a function in a class created in 1. See line 31.

Running the code should yield unreachable exception while the code above is perfectly legal.

I feel the class/interface implementation of AS isn't complete, and it's hard to debug these issues since it will usually just say "unreachable".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions