mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Add test that demonstrates bug
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
//// [propertyAccessOnEmptyObjectLiteral.ts]
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
|
||||
//// [propertyAccessOnEmptyObjectLiteral.js]
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
({}).toString();
|
||||
@@ -0,0 +1,9 @@
|
||||
=== 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, --, --))
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
=== 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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class A { }
|
||||
|
||||
(<A>{}).toString();
|
||||
Reference in New Issue
Block a user