44 lines
583 B
Text
44 lines
583 B
Text
=== tests/cases/compiler/checkForObjectTooStrict.ts ===
|
|
module Foo {
|
|
>Foo : typeof Foo
|
|
|
|
export class Object {
|
|
>Object : Object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Bar extends Foo.Object { // should work
|
|
>Bar : Bar
|
|
>Foo.Object : Foo.Object
|
|
>Foo : typeof Foo
|
|
>Object : typeof Foo.Object
|
|
|
|
constructor () {
|
|
|
|
super();
|
|
>super() : void
|
|
>super : typeof Foo.Object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
class Baz extends Object {
|
|
>Baz : Baz
|
|
>Object : Object
|
|
|
|
constructor () { // ERROR, as expected
|
|
|
|
super();
|
|
>super() : void
|
|
>super : ObjectConstructor
|
|
|
|
}
|
|
|
|
}
|
|
|