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.
37 lines
No EOL
1.3 KiB
Text
37 lines
No EOL
1.3 KiB
Text
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts(12,20): error TS2304: Cannot find name 'C'.
|
|
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts(12,22): error TS1005: '=' expected.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts (2 errors) ====
|
|
// Interface
|
|
interface IPoint {
|
|
getDist(): number;
|
|
}
|
|
|
|
// Module
|
|
module Shapes {
|
|
|
|
// Class
|
|
export class Point implements IPoint {
|
|
|
|
public con:C "hello";
|
|
~
|
|
!!! error TS2304: Cannot find name 'C'.
|
|
~~~~~~~
|
|
!!! error TS1005: '=' expected.
|
|
// Constructor
|
|
constructor (public x: number, public y: number) { }
|
|
|
|
// Instance member
|
|
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
|
|
|
|
// Static member
|
|
static origin = new Point(0, 0);
|
|
}
|
|
|
|
}
|
|
|
|
// Local variables
|
|
var p: IPoint = new Shapes.Point(3, 4);
|
|
var dist = p.getDist();
|
|
|