mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit
This commit is contained in:
12
tests/compiler/class-overloading.ts
Normal file
12
tests/compiler/class-overloading.ts
Normal file
@ -0,0 +1,12 @@
|
||||
class Foo {
|
||||
baz(): void {}
|
||||
}
|
||||
class Bar extends Foo {
|
||||
baz(): void {}
|
||||
}
|
||||
export function test(foo: Foo): void {
|
||||
foo.baz();
|
||||
}
|
||||
// FIXME: this results in a call to Foo.baz instead of Bar.baz above.
|
||||
// ultimately, overloaded functions should implicitly become virtual.
|
||||
test(changetype<Bar>(0));
|
Reference in New Issue
Block a user