TypeScript/tests/baselines/reference/inheritance1.errors.txt
Wesley Wigham 7748694d60
Relate non-augmenting subtypes without resorting to structural comparison (#43624)
* Relate non-augmenting array subtypes without resorting to structural comparison

* Fix lint

* Generalize performance enhancement

* Cache results, feed through via getNormalizedType to remove error intermediates

* Use newly freed up object flags to limit member setting, fix crash with those object flags

* Move flags because there is no TypeFlags.Reference 🤦
2021-04-27 22:52:12 -07:00

115 lines
5.4 KiB
Plaintext

tests/cases/compiler/inheritance1.ts(14,7): error TS2420: Class 'ImageBase' incorrectly implements interface 'SelectableControl'.
Property 'select' is missing in type 'Control' but required in type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(18,7): error TS2420: Class 'Locations' incorrectly implements interface 'SelectableControl'.
Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(31,1): error TS2741: Property 'select' is missing in type 'Control' but required in type 'Button'.
tests/cases/compiler/inheritance1.ts(37,1): error TS2741: Property 'select' is missing in type 'Control' but required in type 'TextBox'.
tests/cases/compiler/inheritance1.ts(40,1): error TS2741: Property 'select' is missing in type 'Control' but required in type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(46,1): error TS2322: Type 'Image1' is not assignable to type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(52,1): error TS2741: Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(53,1): error TS2741: Property 'state' is missing in type 'Locations' but required in type 'Control'.
tests/cases/compiler/inheritance1.ts(55,1): error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations'.
tests/cases/compiler/inheritance1.ts(58,1): error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'SelectableControl'.
tests/cases/compiler/inheritance1.ts(59,1): error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'Control'.
tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations1'.
==== tests/cases/compiler/inheritance1.ts (12 errors) ====
class Control {
private state: any;
}
interface SelectableControl extends Control {
select(): void;
}
class Button extends Control implements SelectableControl {
select() { }
}
class TextBox extends Control {
select() { }
}
class ImageBase extends Control implements SelectableControl{
~~~~~~~~~
!!! error TS2420: Class 'ImageBase' incorrectly implements interface 'SelectableControl'.
!!! error TS2420: Property 'select' is missing in type 'Control' but required in type 'SelectableControl'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:5:5: 'select' is declared here.
}
class Image1 extends Control {
}
class Locations implements SelectableControl {
~~~~~~~~~
!!! error TS2420: Class 'Locations' incorrectly implements interface 'SelectableControl'.
!!! error TS2420: Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here.
select() { }
}
class Locations1 {
select() { }
}
var sc: SelectableControl;
var c: Control;
var b: Button;
sc = b;
c = b;
b = sc;
b = c;
~
!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Button'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:9:5: 'select' is declared here.
var t: TextBox;
sc = t;
c = t;
t = sc;
t = c;
~
!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'TextBox'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:12:5: 'select' is declared here.
var i: ImageBase;
sc = i;
~~
!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'SelectableControl'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:5:5: 'select' is declared here.
c = i;
i = sc;
i = c;
var i1: Image1;
sc = i1;
~~
!!! error TS2322: Type 'Image1' is not assignable to type 'SelectableControl'.
c = i1;
i1 = sc;
i1 = c;
var l: Locations;
sc = l;
~~
!!! error TS2741: Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here.
c = l;
~
!!! error TS2741: Property 'state' is missing in type 'Locations' but required in type 'Control'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here.
l = sc;
l = c;
~
!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:19:5: 'select' is declared here.
var l1: Locations1;
sc = l1;
~~
!!! error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'SelectableControl'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here.
c = l1;
~
!!! error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'Control'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here.
l1 = sc;
l1 = c;
~~
!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations1'.
!!! related TS2728 tests/cases/compiler/inheritance1.ts:22:5: 'select' is declared here.