Skip to content

Assigning compatible concrete class to generic base class typed variable errors out during compile time. #1622

Closed
@AfflatusX

Description

@AfflatusX
abstract class Base<T> {
  abstract doSomething(val: T): void;
}

class A extends Base<i32> {
  doSomething(val: i32): void {

  }
}

let refA: Base<i32> | null = new A(); 

Repro: https://webassembly.studio/?f=bk298o1egu7

would throw Task build failed: type argument count mismatch

Known problem? Any way to work around it?

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