mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
609 B
TypeScript
33 lines
609 B
TypeScript
//// [tests/cases/compiler/es6MemberScoping.ts] ////
|
|
|
|
//// [es6MemberScoping.ts]
|
|
class Foo {
|
|
constructor(store: string) { }
|
|
|
|
public foo() {
|
|
return this._store.length;
|
|
}
|
|
public _store = store; // should be an error.
|
|
}
|
|
|
|
class Foo2 {
|
|
|
|
static Foo2():number { return 0; } // should not be an error
|
|
|
|
}
|
|
|
|
|
|
//// [es6MemberScoping.js]
|
|
"use strict";
|
|
class Foo {
|
|
constructor(store) {
|
|
this._store = store; // should be an error.
|
|
}
|
|
foo() {
|
|
return this._store.length;
|
|
}
|
|
}
|
|
class Foo2 {
|
|
static Foo2() { return 0; } // should not be an error
|
|
}
|