mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 05:01:52 +00:00
Support calling the result of a getter (#252)
This commit is contained in:
committed by
Daniel Wirtz
parent
c27b6e8951
commit
3605630747
13
tests/compiler/getter-call.ts
Normal file
13
tests/compiler/getter-call.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import "allocator/arena";
|
||||
|
||||
class C {
|
||||
get x(): () => i32 {
|
||||
return (): i32 => 42;
|
||||
}
|
||||
}
|
||||
|
||||
export function test(): i32 {
|
||||
// TODO: GH#251 return new C().x();
|
||||
let c = new C();
|
||||
return c.x();
|
||||
}
|
Reference in New Issue
Block a user