Closed
Description
Hello,
Is this compile error reasonable? I'm not sure whether assemblyscript supports the way of following inheritance.
ERROR TS2322: Type '(this: assembly/index/B<f64,~lib/string/String>, f64) => void' is not assignable to type '(this: assembly/index/A, i32) => void'.
foo(a:T):void{
class A<T>{
foo(a:T):void{
trace(`class A ${a}`)
}
}
class B<T,V> extends A<T>{
foo(a:T):void{
trace(`class B ${a}`)
}
}
export function test_foo():void{
let v = new B<i32,f64>()
let v2 = new B<i32,string>()
let v3 = new B<f64,string>() // if comment this line, compile OK
const v_usize = changetype<usize>(v)
changetype<A<i32>>(v_usize).foo(1)
}