Address code review
This commit is contained in:
parent
028c41b951
commit
a8ffb5cad9
|
@ -0,0 +1,15 @@
|
|||
//// [classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts]
|
||||
function f() {
|
||||
new C2(); // OK
|
||||
}
|
||||
class C2 { }
|
||||
|
||||
//// [classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js]
|
||||
function f() {
|
||||
new C2(); // OK
|
||||
}
|
||||
var C2 = (function () {
|
||||
function C2() {
|
||||
}
|
||||
return C2;
|
||||
}());
|
|
@ -0,0 +1,10 @@
|
|||
=== tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts ===
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts, 0, 0))
|
||||
|
||||
new C2(); // OK
|
||||
>C2 : Symbol(C2, Decl(classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts, 2, 1))
|
||||
}
|
||||
class C2 { }
|
||||
>C2 : Symbol(C2, Decl(classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts, 2, 1))
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts ===
|
||||
function f() {
|
||||
>f : () => void
|
||||
|
||||
new C2(); // OK
|
||||
>new C2() : C2
|
||||
>C2 : typeof C2
|
||||
}
|
||||
class C2 { }
|
||||
>C2 : C2
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
//// [classDeclarationCheckUsedBeforeDefinitionInItself.ts]
|
||||
class C3 {
|
||||
static intance = new C3(); // ok
|
||||
}
|
||||
|
||||
//// [classDeclarationCheckUsedBeforeDefinitionInItself.js]
|
||||
class C3 {
|
||||
}
|
||||
C3.intance = new C3(); // ok
|
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInItself.ts ===
|
||||
class C3 {
|
||||
>C3 : Symbol(C3, Decl(classDeclarationCheckUsedBeforeDefinitionInItself.ts, 0, 0))
|
||||
|
||||
static intance = new C3(); // ok
|
||||
>intance : Symbol(C3.intance, Decl(classDeclarationCheckUsedBeforeDefinitionInItself.ts, 0, 10))
|
||||
>C3 : Symbol(C3, Decl(classDeclarationCheckUsedBeforeDefinitionInItself.ts, 0, 0))
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
=== tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInItself.ts ===
|
||||
class C3 {
|
||||
>C3 : C3
|
||||
|
||||
static intance = new C3(); // ok
|
||||
>intance : C3
|
||||
>new C3() : C3
|
||||
>C3 : typeof C3
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
function f() {
|
||||
new C2(); // OK
|
||||
}
|
||||
class C2 { }
|
|
@ -0,0 +1,4 @@
|
|||
// @target: es6
|
||||
class C3 {
|
||||
static intance = new C3(); // ok
|
||||
}
|
Loading…
Reference in a new issue