Fix comments
This commit is contained in:
parent
35a303ac01
commit
8b8d33d8b8
|
@ -6,13 +6,13 @@ tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate iden
|
|||
// Checking class with other things in type space not value space
|
||||
|
||||
// class then interface
|
||||
class c11 { // error
|
||||
class c11 {
|
||||
foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
interface c11 { // error
|
||||
interface c11 {
|
||||
bar(): void;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
// Checking class with other things in type space not value space
|
||||
|
||||
// class then interface
|
||||
class c11 { // error
|
||||
class c11 {
|
||||
foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
interface c11 { // error
|
||||
interface c11 {
|
||||
bar(): void;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@ tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate i
|
|||
}
|
||||
|
||||
// interface then class
|
||||
interface i2 { // error
|
||||
interface i2 {
|
||||
foo(): void;
|
||||
}
|
||||
|
||||
class i2 { // error
|
||||
class i2 {
|
||||
bar() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ interface i {
|
|||
}
|
||||
|
||||
// interface then class
|
||||
interface i2 { // error
|
||||
interface i2 {
|
||||
foo(): void;
|
||||
}
|
||||
|
||||
class i2 { // error
|
||||
class i2 {
|
||||
bar() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.
|
|||
class C { foo: string; }
|
||||
~~~
|
||||
!!! error TS2300: Duplicate identifier 'foo'.
|
||||
interface C { foo: string; } // error
|
||||
interface C { foo: string; }
|
||||
~~~
|
||||
!!! error TS2300: Duplicate identifier 'foo'.
|
||||
|
||||
|
@ -19,7 +19,7 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.
|
|||
!!! error TS2300: Duplicate identifier 'bar'.
|
||||
}
|
||||
|
||||
interface D { // error
|
||||
interface D {
|
||||
bar: string;
|
||||
~~~
|
||||
!!! error TS2300: Duplicate identifier 'bar'.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
//// [classAndInterfaceWithSameName.ts]
|
||||
class C { foo: string; }
|
||||
interface C { foo: string; } // error
|
||||
interface C { foo: string; }
|
||||
|
||||
module M {
|
||||
class D {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
interface D { // error
|
||||
interface D {
|
||||
bar: string;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): er
|
|||
export interface I { }
|
||||
}
|
||||
module M {
|
||||
export class I { } // error
|
||||
export class I { }
|
||||
}
|
||||
|
||||
module M {
|
||||
|
|
|
@ -3,7 +3,7 @@ module M {
|
|||
export interface I { }
|
||||
}
|
||||
module M {
|
||||
export class I { } // error
|
||||
export class I { }
|
||||
}
|
||||
|
||||
module M {
|
||||
|
@ -60,7 +60,7 @@ var M;
|
|||
}
|
||||
return I;
|
||||
})();
|
||||
M.I = I; // error
|
||||
M.I = I;
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (M) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class Bar extends Foo {
|
|||
|
||||
|
||||
var bar = new Bar();
|
||||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
|
||||
|
||||
var foo = new Foo();
|
||||
|
@ -61,6 +61,6 @@ var Bar = (function (_super) {
|
|||
return Bar;
|
||||
})(Foo);
|
||||
var bar = new Bar();
|
||||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
var foo = new Foo();
|
||||
foo = bar;
|
||||
|
|
|
@ -54,13 +54,13 @@ var bar = new Bar();
|
|||
>bar : Symbol(bar, Decl(interfaceClassMerging2.ts, 28, 3))
|
||||
>Bar : Symbol(Bar, Decl(interfaceClassMerging2.ts, 11, 1), Decl(interfaceClassMerging2.ts, 17, 1))
|
||||
|
||||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod : Symbol(Foo.classFooMethod, Decl(interfaceClassMerging2.ts, 6, 27))
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod : Symbol(Bar.classBarMethod, Decl(interfaceClassMerging2.ts, 20, 27))
|
||||
>bar.classFooMethod().interfaceFooMethod : Symbol(Foo.interfaceFooMethod, Decl(interfaceClassMerging2.ts, 0, 15))
|
||||
>bar.classFooMethod : Symbol(Foo.classFooMethod, Decl(interfaceClassMerging2.ts, 6, 27))
|
||||
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod : Symbol(Foo.classFooMethod, Decl(interfaceClassMerging2.ts, 6, 27))
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod : Symbol(Bar.classBarMethod, Decl(interfaceClassMerging2.ts, 20, 27))
|
||||
>bar.interfaceBarMethod().interfaceFooMethod : Symbol(Foo.interfaceFooMethod, Decl(interfaceClassMerging2.ts, 0, 15))
|
||||
>bar.interfaceBarMethod : Symbol(Bar.interfaceBarMethod, Decl(interfaceClassMerging2.ts, 14, 15))
|
||||
>bar : Symbol(bar, Decl(interfaceClassMerging2.ts, 28, 3))
|
||||
>classFooMethod : Symbol(Foo.classFooMethod, Decl(interfaceClassMerging2.ts, 6, 27))
|
||||
>interfaceBarMethod : Symbol(Bar.interfaceBarMethod, Decl(interfaceClassMerging2.ts, 14, 15))
|
||||
>interfaceFooMethod : Symbol(Foo.interfaceFooMethod, Decl(interfaceClassMerging2.ts, 0, 15))
|
||||
>classBarMethod : Symbol(Bar.classBarMethod, Decl(interfaceClassMerging2.ts, 20, 27))
|
||||
>classFooMethod : Symbol(Foo.classFooMethod, Decl(interfaceClassMerging2.ts, 6, 27))
|
||||
|
|
|
@ -55,17 +55,17 @@ var bar = new Bar();
|
|||
>new Bar() : Bar
|
||||
>Bar : typeof Bar
|
||||
|
||||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod() : Bar
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod : () => Bar
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod() : Bar
|
||||
>bar.classFooMethod().interfaceFooMethod().classBarMethod : () => Bar
|
||||
>bar.classFooMethod().interfaceFooMethod() : Bar
|
||||
>bar.classFooMethod().interfaceFooMethod : () => Bar
|
||||
>bar.classFooMethod() : Bar
|
||||
>bar.classFooMethod : () => Bar
|
||||
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod() : Bar
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod : () => Bar
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod() : Bar
|
||||
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod : () => Bar
|
||||
>bar.interfaceBarMethod().interfaceFooMethod() : Bar
|
||||
>bar.interfaceBarMethod().interfaceFooMethod : () => Bar
|
||||
>bar.interfaceBarMethod() : Bar
|
||||
>bar.interfaceBarMethod : () => Bar
|
||||
>bar : Bar
|
||||
>classFooMethod : () => Bar
|
||||
>interfaceBarMethod : () => Bar
|
||||
>interfaceFooMethod : () => Bar
|
||||
>classBarMethod : () => Bar
|
||||
>classFooMethod : () => Bar
|
||||
|
|
|
@ -11,13 +11,13 @@ interface C2 { }
|
|||
|
||||
declare class C2 { }
|
||||
|
||||
class C3 { } // error -- cannot merge non-ambient class and interface
|
||||
class C3 { }
|
||||
|
||||
interface C3 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C3 { }
|
||||
|
||||
interface C4 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C4 { }
|
||||
|
||||
class C4 { } // error -- cannot merge non-ambient class and interface
|
||||
class C4 { }
|
||||
|
||||
interface C5 {
|
||||
x1: number;
|
||||
|
@ -59,12 +59,12 @@ var C3 = (function () {
|
|||
function C3() {
|
||||
}
|
||||
return C3;
|
||||
})(); // error -- cannot merge non-ambient class and interface
|
||||
})();
|
||||
var C4 = (function () {
|
||||
function C4() {
|
||||
}
|
||||
return C4;
|
||||
})(); // error -- cannot merge non-ambient class and interface
|
||||
})();
|
||||
// checks if properties actually were merged
|
||||
var c5;
|
||||
c5.x1;
|
||||
|
|
|
@ -13,16 +13,16 @@ interface C2 { }
|
|||
declare class C2 { }
|
||||
>C2 : Symbol(C2, Decl(file1.ts, 4, 16), Decl(file1.ts, 6, 16))
|
||||
|
||||
class C3 { } // error -- cannot merge non-ambient class and interface
|
||||
class C3 { }
|
||||
>C3 : Symbol(C3, Decl(file1.ts, 8, 20), Decl(file1.ts, 10, 12))
|
||||
|
||||
interface C3 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C3 { }
|
||||
>C3 : Symbol(C3, Decl(file1.ts, 8, 20), Decl(file1.ts, 10, 12))
|
||||
|
||||
interface C4 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C4 { }
|
||||
>C4 : Symbol(C4, Decl(file1.ts, 12, 16), Decl(file1.ts, 14, 16))
|
||||
|
||||
class C4 { } // error -- cannot merge non-ambient class and interface
|
||||
class C4 { }
|
||||
>C4 : Symbol(C4, Decl(file1.ts, 12, 16), Decl(file1.ts, 14, 16))
|
||||
|
||||
interface C5 {
|
||||
|
|
|
@ -13,16 +13,16 @@ interface C2 { }
|
|||
declare class C2 { }
|
||||
>C2 : C2
|
||||
|
||||
class C3 { } // error -- cannot merge non-ambient class and interface
|
||||
class C3 { }
|
||||
>C3 : C3
|
||||
|
||||
interface C3 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C3 { }
|
||||
>C3 : C3
|
||||
|
||||
interface C4 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C4 { }
|
||||
>C4 : C4
|
||||
|
||||
class C4 { } // error -- cannot merge non-ambient class and interface
|
||||
class C4 { }
|
||||
>C4 : C4
|
||||
|
||||
interface C5 {
|
||||
|
|
|
@ -82,8 +82,8 @@ tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifie
|
|||
interface fi { } // ok
|
||||
|
||||
class cli { }
|
||||
interface cli { } // error
|
||||
interface cli { }
|
||||
|
||||
interface cli2 { }
|
||||
class cli2 { } // error
|
||||
class cli2 { }
|
||||
}
|
|
@ -41,10 +41,10 @@ module T {
|
|||
interface fi { } // ok
|
||||
|
||||
class cli { }
|
||||
interface cli { } // error
|
||||
interface cli { }
|
||||
|
||||
interface cli2 { }
|
||||
class cli2 { } // error
|
||||
class cli2 { }
|
||||
}
|
||||
|
||||
//// [nameCollisions.js]
|
||||
|
@ -102,5 +102,5 @@ var T;
|
|||
function cli2() {
|
||||
}
|
||||
return cli2;
|
||||
})(); // error
|
||||
})();
|
||||
})(T || (T = {}));
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Checking class with other things in type space not value space
|
||||
|
||||
// class then interface
|
||||
class c11 { // error
|
||||
class c11 {
|
||||
foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
interface c11 { // error
|
||||
interface c11 {
|
||||
bar(): void;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ interface i {
|
|||
}
|
||||
|
||||
// interface then class
|
||||
interface i2 { // error
|
||||
interface i2 {
|
||||
foo(): void;
|
||||
}
|
||||
|
||||
class i2 { // error
|
||||
class i2 {
|
||||
bar() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ module M {
|
|||
export interface I { }
|
||||
}
|
||||
module M {
|
||||
export class I { } // error
|
||||
export class I { }
|
||||
}
|
||||
|
||||
module M {
|
||||
|
|
|
@ -27,7 +27,7 @@ class Bar extends Foo {
|
|||
|
||||
|
||||
var bar = new Bar();
|
||||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
|
||||
|
||||
|
||||
var foo = new Foo();
|
||||
|
|
|
@ -40,8 +40,8 @@ module T {
|
|||
interface fi { } // ok
|
||||
|
||||
class cli { }
|
||||
interface cli { } // error
|
||||
interface cli { }
|
||||
|
||||
interface cli2 { }
|
||||
class cli2 { } // error
|
||||
class cli2 { }
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
class C { foo: string; }
|
||||
interface C { foo: string; } // error
|
||||
interface C { foo: string; }
|
||||
|
||||
module M {
|
||||
class D {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
interface D { // error
|
||||
interface D {
|
||||
bar: string;
|
||||
}
|
||||
}
|
|
@ -10,13 +10,13 @@ interface C2 { }
|
|||
|
||||
declare class C2 { }
|
||||
|
||||
class C3 { } // error -- cannot merge non-ambient class and interface
|
||||
class C3 { }
|
||||
|
||||
interface C3 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C3 { }
|
||||
|
||||
interface C4 { } // error -- cannot merge non-ambient class and interface
|
||||
interface C4 { }
|
||||
|
||||
class C4 { } // error -- cannot merge non-ambient class and interface
|
||||
class C4 { }
|
||||
|
||||
interface C5 {
|
||||
x1: number;
|
||||
|
|
Loading…
Reference in a new issue