mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Expand test to ensure property access on object literal has correct behaviour
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
//// [propertyAccessOnEmptyObjectLiteral.ts]
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
|
||||
//// [propertyAccessOnEmptyObjectLiteral.js]
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
({}).toString();
|
||||
@@ -1,9 +0,0 @@
|
||||
=== tests/cases/compiler/propertyAccessOnEmptyObjectLiteral.ts ===
|
||||
class A { }
|
||||
>A : Symbol(A, Decl(propertyAccessOnEmptyObjectLiteral.ts, 0, 0))
|
||||
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
>A : Symbol(A, Decl(propertyAccessOnEmptyObjectLiteral.ts, 0, 0))
|
||||
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
=== tests/cases/compiler/propertyAccessOnEmptyObjectLiteral.ts ===
|
||||
class A { }
|
||||
>A : A
|
||||
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString() : string
|
||||
>(<A>{}).toString : () => string
|
||||
>(<A>{}) : A
|
||||
><A>{} : A
|
||||
>A : A
|
||||
>{} : {}
|
||||
>toString : () => string
|
||||
|
||||
20
tests/baselines/reference/propertyAccessOnObjectLiteral.js
Normal file
20
tests/baselines/reference/propertyAccessOnObjectLiteral.js
Normal file
@@ -0,0 +1,20 @@
|
||||
//// [propertyAccessOnObjectLiteral.ts]
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
|
||||
(() => {
|
||||
(<A>{}).toString();
|
||||
})();
|
||||
|
||||
|
||||
//// [propertyAccessOnObjectLiteral.js]
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
({}).toString();
|
||||
(function () {
|
||||
({}).toString();
|
||||
})();
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/compiler/propertyAccessOnObjectLiteral.ts ===
|
||||
class A { }
|
||||
>A : Symbol(A, Decl(propertyAccessOnObjectLiteral.ts, 0, 0))
|
||||
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
>A : Symbol(A, Decl(propertyAccessOnObjectLiteral.ts, 0, 0))
|
||||
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
|
||||
(() => {
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
>A : Symbol(A, Decl(propertyAccessOnObjectLiteral.ts, 0, 0))
|
||||
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
|
||||
|
||||
})();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
=== tests/cases/compiler/propertyAccessOnObjectLiteral.ts ===
|
||||
class A { }
|
||||
>A : A
|
||||
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString() : string
|
||||
>(<A>{}).toString : () => string
|
||||
>(<A>{}) : A
|
||||
><A>{} : A
|
||||
>A : A
|
||||
>{} : {}
|
||||
>toString : () => string
|
||||
|
||||
(() => {
|
||||
>(() => { (<A>{}).toString();})() : void
|
||||
>(() => { (<A>{}).toString();}) : () => void
|
||||
>() => { (<A>{}).toString();} : () => void
|
||||
|
||||
(<A>{}).toString();
|
||||
>(<A>{}).toString() : string
|
||||
>(<A>{}).toString : () => string
|
||||
>(<A>{}) : A
|
||||
><A>{} : A
|
||||
>A : A
|
||||
>{} : {}
|
||||
>toString : () => string
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
7
tests/cases/compiler/propertyAccessOnObjectLiteral.ts
Normal file
7
tests/cases/compiler/propertyAccessOnObjectLiteral.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
|
||||
(() => {
|
||||
(<A>{}).toString();
|
||||
})();
|
||||
Reference in New Issue
Block a user