mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-15 16:01:30 +00:00
Support 'this' in static functions, fixes #45; Fix propagation of 'ambient' flag
This commit is contained in:
8
tests/compiler/static-this.ts
Normal file
8
tests/compiler/static-this.ts
Normal file
@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
static bar: i32 = 42;
|
||||
static getBar(): i32 {
|
||||
return this.bar;
|
||||
}
|
||||
}
|
||||
|
||||
assert(Foo.getBar() == 42);
|
Reference in New Issue
Block a user