mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
463 B
Plaintext
20 lines
463 B
Plaintext
classImplementsClass3.ts(13,5): error TS2454: Variable 'c2' is used before being assigned.
|
|
|
|
|
|
==== classImplementsClass3.ts (1 errors) ====
|
|
class A { foo(): number { return 1; } }
|
|
class C implements A {
|
|
foo() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
class C2 extends A {}
|
|
|
|
// no errors
|
|
var c: C;
|
|
var c2: C2;
|
|
c = c2;
|
|
~~
|
|
!!! error TS2454: Variable 'c2' is used before being assigned.
|
|
c2 = c; |