29 lines
680 B
Text
29 lines
680 B
Text
|
==== tests/cases/compiler/multiLineErrors.ts (1 errors) ====
|
||
|
var t = 32;
|
||
|
|
||
|
function noReturn(): {
|
||
|
n: string;
|
||
|
y: number;
|
||
|
}
|
||
|
{
|
||
|
var x = 4;
|
||
|
var y = 10;
|
||
|
}
|
||
|
|
||
|
interface A1 {
|
||
|
x: { y: number; };
|
||
|
}
|
||
|
interface A2 {
|
||
|
x: { y: string; };
|
||
|
}
|
||
|
|
||
|
var t1: A1;
|
||
|
var t2: A2;
|
||
|
t1 = t2;
|
||
|
~~
|
||
|
!!! Type 'A2' is not assignable to type 'A1':
|
||
|
!!! Types of property 'x' are incompatible:
|
||
|
!!! Type '{ y: string; }' is not assignable to type '{ y: number; }':
|
||
|
!!! Types of property 'y' are incompatible:
|
||
|
!!! Type 'string' is not assignable to type 'number'.
|
||
|
|