mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
465 B
TypeScript
18 lines
465 B
TypeScript
//// [tests/cases/compiler/extendNonClassSymbol2.ts] ////
|
|
|
|
//// [extendNonClassSymbol2.ts]
|
|
function Foo() {
|
|
this.x = 1;
|
|
}
|
|
var x = new Foo(); // legal, considered a constructor function
|
|
class C extends Foo {} // error, could not find symbol Foo
|
|
|
|
//// [extendNonClassSymbol2.js]
|
|
"use strict";
|
|
function Foo() {
|
|
this.x = 1;
|
|
}
|
|
var x = new Foo(); // legal, considered a constructor function
|
|
class C extends Foo {
|
|
} // error, could not find symbol Foo
|