mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 12:57:11 -06:00
Test:spreading any doesn't set flags on anyType
And update baselines
This commit is contained in:
parent
8dc1747db7
commit
587ba8d0ae
@ -0,0 +1,16 @@
|
||||
//// [explicitAnyAfterSpreadNoImplicitAnyError.ts]
|
||||
({ a: [], ...(null as any) });
|
||||
let x: any;
|
||||
|
||||
|
||||
//// [explicitAnyAfterSpreadNoImplicitAnyError.js]
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
(__assign({ a: [] }, null));
|
||||
var x;
|
||||
@ -0,0 +1,7 @@
|
||||
=== tests/cases/compiler/explicitAnyAfterSpreadNoImplicitAnyError.ts ===
|
||||
({ a: [], ...(null as any) });
|
||||
>a : Symbol(a, Decl(explicitAnyAfterSpreadNoImplicitAnyError.ts, 0, 2))
|
||||
|
||||
let x: any;
|
||||
>x : Symbol(x, Decl(explicitAnyAfterSpreadNoImplicitAnyError.ts, 1, 3))
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/explicitAnyAfterSpreadNoImplicitAnyError.ts ===
|
||||
({ a: [], ...(null as any) });
|
||||
>({ a: [], ...(null as any) }) : any
|
||||
>{ a: [], ...(null as any) } : any
|
||||
>a : undefined[]
|
||||
>[] : undefined[]
|
||||
>(null as any) : any
|
||||
>null as any : any
|
||||
>null : null
|
||||
|
||||
let x: any;
|
||||
>x : any
|
||||
|
||||
@ -200,7 +200,6 @@ let cplus: { p: number, plus(): void } = { ...c, plus() { return this.p + 1; } }
|
||||
>plus : Symbol(plus, Decl(objectSpread.ts, 49, 23))
|
||||
>c : Symbol(c, Decl(objectSpread.ts, 45, 3))
|
||||
>plus : Symbol(plus, Decl(objectSpread.ts, 49, 48))
|
||||
>this : Symbol(__object, Decl(objectSpread.ts, 41, 15))
|
||||
|
||||
cplus.plus();
|
||||
>cplus.plus : Symbol(plus, Decl(objectSpread.ts, 49, 23))
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
// @noImplicitAny: true
|
||||
({ a: [], ...(null as any) });
|
||||
let x: any;
|
||||
Loading…
x
Reference in New Issue
Block a user