mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
38 lines
979 B
TypeScript
38 lines
979 B
TypeScript
//// [tests/cases/compiler/deeplyNestedAssignabilityErrorsCombined.ts] ////
|
|
|
|
//// [deeplyNestedAssignabilityErrorsCombined.ts]
|
|
let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } };
|
|
let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } };
|
|
x = y;
|
|
|
|
class Ctor1 {
|
|
g = "ok"
|
|
}
|
|
|
|
class Ctor2 {
|
|
g = 12;
|
|
}
|
|
|
|
let x2 = { a: { b: { c: { d: { e: { f: Ctor1 } } } } } };
|
|
let y2 = { a: { b: { c: { d: { e: { f: Ctor2 } } } } } };
|
|
x2 = y2;
|
|
|
|
//// [deeplyNestedAssignabilityErrorsCombined.js]
|
|
"use strict";
|
|
let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } };
|
|
let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } };
|
|
x = y;
|
|
class Ctor1 {
|
|
constructor() {
|
|
this.g = "ok";
|
|
}
|
|
}
|
|
class Ctor2 {
|
|
constructor() {
|
|
this.g = 12;
|
|
}
|
|
}
|
|
let x2 = { a: { b: { c: { d: { e: { f: Ctor1 } } } } } };
|
|
let y2 = { a: { b: { c: { d: { e: { f: Ctor2 } } } } } };
|
|
x2 = y2;
|