This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
49 lines
No EOL
1.4 KiB
Text
49 lines
No EOL
1.4 KiB
Text
tests/cases/compiler/extension.ts(10,18): error TS2300: Duplicate identifier 'C'.
|
|
tests/cases/compiler/extension.ts(16,5): error TS1128: Declaration or statement expected.
|
|
tests/cases/compiler/extension.ts(16,12): error TS2304: Cannot find name 'extension'.
|
|
tests/cases/compiler/extension.ts(16,22): error TS1005: ';' expected.
|
|
tests/cases/compiler/extension.ts(16,28): error TS2300: Duplicate identifier 'C'.
|
|
tests/cases/compiler/extension.ts(22,3): error TS2339: Property 'pe' does not exist on type 'C'.
|
|
|
|
|
|
==== tests/cases/compiler/extension.ts (6 errors) ====
|
|
interface I {
|
|
x;
|
|
}
|
|
|
|
interface I {
|
|
y;
|
|
}
|
|
|
|
declare module M {
|
|
export class C {
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'C'.
|
|
public p:number;
|
|
}
|
|
}
|
|
|
|
declare module M {
|
|
export extension class C {
|
|
~~~~~~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
~~~~~~~~~
|
|
!!! error TS2304: Cannot find name 'extension'.
|
|
~~~~~
|
|
!!! error TS1005: ';' expected.
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'C'.
|
|
public pe:string;
|
|
}
|
|
}
|
|
|
|
var c=new M.C();
|
|
c.pe;
|
|
~~
|
|
!!! error TS2339: Property 'pe' does not exist on type 'C'.
|
|
c.p;
|
|
var i:I;
|
|
i.x;
|
|
i.y;
|
|
|
|
|