Accepted baselines.

This commit is contained in:
Daniel Rosenwasser 2016-01-14 16:28:22 -08:00
parent 32454d0a84
commit e7cee96007
4 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,13 @@
tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2304: Cannot find name 'foo'.
==== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts (1 errors) ====
class C {
static foo: string;
bar() {
let k = foo;
~~~
!!! error TS2304: Cannot find name 'foo'.
}
}

View file

@ -0,0 +1,18 @@
//// [accessInstanceMemberFromStaticMethod01.ts]
class C {
static foo: string;
bar() {
let k = foo;
}
}
//// [accessInstanceMemberFromStaticMethod01.js]
var C = (function () {
function C() {
}
C.prototype.bar = function () {
var k = foo;
};
return C;
}());

View file

@ -0,0 +1,13 @@
tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts(5,17): error TS2304: Cannot find name 'foo'.
==== tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts (1 errors) ====
class C {
foo: string;
static bar() {
let k = foo;
~~~
!!! error TS2304: Cannot find name 'foo'.
}
}

View file

@ -0,0 +1,18 @@
//// [accessStaticMemberFromInstanceMethod01.ts]
class C {
foo: string;
static bar() {
let k = foo;
}
}
//// [accessStaticMemberFromInstanceMethod01.js]
var C = (function () {
function C() {
}
C.bar = function () {
var k = foo;
};
return C;
}());