mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Accept new baselines
This commit is contained in:
parent
168d367b5e
commit
c2d8a593b9
@ -21,6 +21,10 @@ var v = {
|
||||
>a : Symbol(a, Decl(commentsOnObjectLiteral3.ts, 8, 13), Decl(commentsOnObjectLiteral3.ts, 12, 18))
|
||||
|
||||
return this.prop;
|
||||
>this.prop : Symbol(prop, Decl(commentsOnObjectLiteral3.ts, 1, 9))
|
||||
>this : Symbol(v, Decl(commentsOnObjectLiteral3.ts, 1, 7))
|
||||
>prop : Symbol(prop, Decl(commentsOnObjectLiteral3.ts, 1, 9))
|
||||
|
||||
} /*trailing 1*/,
|
||||
//setter
|
||||
set a(value) {
|
||||
@ -28,6 +32,9 @@ var v = {
|
||||
>value : Symbol(value, Decl(commentsOnObjectLiteral3.ts, 14, 7))
|
||||
|
||||
this.prop = value;
|
||||
>this.prop : Symbol(prop, Decl(commentsOnObjectLiteral3.ts, 1, 9))
|
||||
>this : Symbol(v, Decl(commentsOnObjectLiteral3.ts, 1, 7))
|
||||
>prop : Symbol(prop, Decl(commentsOnObjectLiteral3.ts, 1, 9))
|
||||
>value : Symbol(value, Decl(commentsOnObjectLiteral3.ts, 14, 7))
|
||||
|
||||
} // trailing 2
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
=== tests/cases/compiler/commentsOnObjectLiteral3.ts ===
|
||||
|
||||
var v = {
|
||||
>v : { prop: number; func: () => void; func1(): void; a: any; }
|
||||
>{ //property prop: 1 /* multiple trailing comments */ /*trailing comments*/, //property func: function () { }, //PropertyName + CallSignature func1() { }, //getter get a() { return this.prop; } /*trailing 1*/, //setter set a(value) { this.prop = value; } // trailing 2} : { prop: number; func: () => void; func1(): void; a: any; }
|
||||
>v : { prop: number; func: () => void; func1(): void; a: number; }
|
||||
>{ //property prop: 1 /* multiple trailing comments */ /*trailing comments*/, //property func: function () { }, //PropertyName + CallSignature func1() { }, //getter get a() { return this.prop; } /*trailing 1*/, //setter set a(value) { this.prop = value; } // trailing 2} : { prop: number; func: () => void; func1(): void; a: number; }
|
||||
|
||||
//property
|
||||
prop: 1 /* multiple trailing comments */ /*trailing comments*/,
|
||||
@ -21,25 +21,25 @@ var v = {
|
||||
|
||||
//getter
|
||||
get a() {
|
||||
>a : any
|
||||
>a : number
|
||||
|
||||
return this.prop;
|
||||
>this.prop : any
|
||||
>this : any
|
||||
>prop : any
|
||||
>this.prop : number
|
||||
>this : { prop: number; func: () => void; func1(): void; a: number; }
|
||||
>prop : number
|
||||
|
||||
} /*trailing 1*/,
|
||||
//setter
|
||||
set a(value) {
|
||||
>a : any
|
||||
>value : any
|
||||
>a : number
|
||||
>value : number
|
||||
|
||||
this.prop = value;
|
||||
>this.prop = value : any
|
||||
>this.prop : any
|
||||
>this : any
|
||||
>prop : any
|
||||
>value : any
|
||||
>this.prop = value : number
|
||||
>this.prop : number
|
||||
>this : { prop: number; func: () => void; func1(): void; a: number; }
|
||||
>prop : number
|
||||
>value : number
|
||||
|
||||
} // trailing 2
|
||||
};
|
||||
|
||||
@ -15,6 +15,9 @@ function /*1*/makePoint(x: number) {
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14))
|
||||
>this.b : Symbol(b, Decl(declFileObjectLiteralWithAccessors.ts, 2, 12))
|
||||
>this : Symbol(__object, Decl(declFileObjectLiteralWithAccessors.ts, 2, 10))
|
||||
>b : Symbol(b, Decl(declFileObjectLiteralWithAccessors.ts, 2, 12))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14))
|
||||
|
||||
};
|
||||
|
||||
@ -19,9 +19,9 @@ function /*1*/makePoint(x: number) {
|
||||
>x : number
|
||||
>a : number
|
||||
>this.b = a : number
|
||||
>this.b : any
|
||||
>this : any
|
||||
>b : any
|
||||
>this.b : number
|
||||
>this : { b: number; x: number; }
|
||||
>b : number
|
||||
>a : number
|
||||
|
||||
};
|
||||
|
||||
@ -11,6 +11,9 @@ function /*1*/makePoint(x: number) {
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14))
|
||||
>this.b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 12))
|
||||
>this : Symbol(__object, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 10))
|
||||
>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 12))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14))
|
||||
|
||||
};
|
||||
|
||||
@ -15,9 +15,9 @@ function /*1*/makePoint(x: number) {
|
||||
>x : number
|
||||
>a : number
|
||||
>this.b = a : number
|
||||
>this.b : any
|
||||
>this : any
|
||||
>b : any
|
||||
>this.b : number
|
||||
>this : { b: number; x: number; }
|
||||
>b : number
|
||||
>a : number
|
||||
|
||||
};
|
||||
|
||||
@ -8,11 +8,18 @@ var object = {
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
>this._0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
>this : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 12))
|
||||
>_0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
|
||||
},
|
||||
set 0(x: number) {
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
this._0 = x;
|
||||
>this._0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
>this : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 12))
|
||||
>_0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
},
|
||||
|
||||
@ -10,9 +10,9 @@ var object = {
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
>this._0 : number
|
||||
>this : { _0: number; 0: number; }
|
||||
>_0 : number
|
||||
|
||||
},
|
||||
set 0(x: number) {
|
||||
@ -20,9 +20,9 @@ var object = {
|
||||
|
||||
this._0 = x;
|
||||
>this._0 = x : number
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
>this._0 : number
|
||||
>this : { _0: number; 0: number; }
|
||||
>_0 : number
|
||||
>x : number
|
||||
|
||||
},
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts(10,9): error TS2682: 'get' and 'set' accessor must have the same 'this' type.
|
||||
tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts(11,9): error TS2682: 'get' and 'set' accessor must have the same 'this' type.
|
||||
tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts(16,22): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts (2 errors) ====
|
||||
interface Foo {
|
||||
n: number;
|
||||
x: number;
|
||||
@ -24,7 +23,5 @@ tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts(16,22): er
|
||||
n: 16,
|
||||
// there is no contextual this type from an Foo.x.
|
||||
get x() { return this.n; }
|
||||
~~~~
|
||||
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user