mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Support 'this' in static functions, fixes #45; Fix propagation of 'ambient' flag
This commit is contained in:
@ -2,10 +2,15 @@ declare namespace A {
|
||||
namespace B {
|
||||
export namespace C {
|
||||
var aVar: i32;
|
||||
const aConst: i32 = 0;
|
||||
function aFunc(): void {}
|
||||
const aConst: i32;
|
||||
const aConstInvalid: i32 = 0; // 1039: Initializers are not allowed in ambient contexts.
|
||||
function aFunc(): void;
|
||||
function aFuncInvalid(): void {} // 1183: An implementation cannot be declared in ambient contexts.
|
||||
enum AnEnum {}
|
||||
class AClass {}
|
||||
}
|
||||
namespace D {
|
||||
var aVar: i32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,17 @@ declare namespace A {
|
||||
namespace B {
|
||||
export namespace C {
|
||||
var aVar: i32;
|
||||
const aConst: i32 = 0;
|
||||
function aFunc(): void {}
|
||||
const aConst: i32;
|
||||
const aConstInvalid: i32 = 0;
|
||||
function aFunc(): void;
|
||||
function aFuncInvalid(): void {}
|
||||
enum AnEnum {}
|
||||
class AClass {}
|
||||
}
|
||||
namespace D {
|
||||
var aVar: i32;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ERROR 1039: "Initializers are not allowed in ambient contexts." in namespace.ts:6:31
|
||||
// ERROR 1183: "An implementation cannot be declared in ambient contexts." in namespace.ts:8:36
|
||||
|
Reference in New Issue
Block a user