mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 01:48:33 -05:00
Add downlevel emit tests
This commit is contained in:
40
tests/baselines/reference/superSymbolIndexedAccess5.js
Normal file
40
tests/baselines/reference/superSymbolIndexedAccess5.js
Normal file
@@ -0,0 +1,40 @@
|
||||
//// [superSymbolIndexedAccess5.ts]
|
||||
var symbol: any;
|
||||
|
||||
class Foo {
|
||||
[symbol]() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
[symbol]() {
|
||||
return super[symbol]();
|
||||
}
|
||||
}
|
||||
|
||||
//// [superSymbolIndexedAccess5.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var symbol;
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
Foo.prototype[symbol] = function () {
|
||||
return 0;
|
||||
};
|
||||
return Foo;
|
||||
})();
|
||||
var Bar = (function (_super) {
|
||||
__extends(Bar, _super);
|
||||
function Bar() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
Bar.prototype[symbol] = function () {
|
||||
return _super.prototype[symbol]();
|
||||
};
|
||||
return Bar;
|
||||
})(Foo);
|
||||
26
tests/baselines/reference/superSymbolIndexedAccess5.symbols
Normal file
26
tests/baselines/reference/superSymbolIndexedAccess5.symbols
Normal file
@@ -0,0 +1,26 @@
|
||||
=== tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts ===
|
||||
var symbol: any;
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess5.ts, 0, 3))
|
||||
|
||||
class Foo {
|
||||
>Foo : Symbol(Foo, Decl(superSymbolIndexedAccess5.ts, 0, 16))
|
||||
|
||||
[symbol]() {
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess5.ts, 0, 3))
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
>Bar : Symbol(Bar, Decl(superSymbolIndexedAccess5.ts, 6, 1))
|
||||
>Foo : Symbol(Foo, Decl(superSymbolIndexedAccess5.ts, 0, 16))
|
||||
|
||||
[symbol]() {
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess5.ts, 0, 3))
|
||||
|
||||
return super[symbol]();
|
||||
>super : Symbol(Foo, Decl(superSymbolIndexedAccess5.ts, 0, 16))
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess5.ts, 0, 3))
|
||||
}
|
||||
}
|
||||
29
tests/baselines/reference/superSymbolIndexedAccess5.types
Normal file
29
tests/baselines/reference/superSymbolIndexedAccess5.types
Normal file
@@ -0,0 +1,29 @@
|
||||
=== tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts ===
|
||||
var symbol: any;
|
||||
>symbol : any
|
||||
|
||||
class Foo {
|
||||
>Foo : Foo
|
||||
|
||||
[symbol]() {
|
||||
>symbol : any
|
||||
|
||||
return 0;
|
||||
>0 : number
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
>Bar : Bar
|
||||
>Foo : Foo
|
||||
|
||||
[symbol]() {
|
||||
>symbol : any
|
||||
|
||||
return super[symbol]();
|
||||
>super[symbol]() : any
|
||||
>super[symbol] : any
|
||||
>super : Foo
|
||||
>symbol : any
|
||||
}
|
||||
}
|
||||
40
tests/baselines/reference/superSymbolIndexedAccess6.js
Normal file
40
tests/baselines/reference/superSymbolIndexedAccess6.js
Normal file
@@ -0,0 +1,40 @@
|
||||
//// [superSymbolIndexedAccess6.ts]
|
||||
var symbol: any;
|
||||
|
||||
class Foo {
|
||||
static [symbol]() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
static [symbol]() {
|
||||
return super[symbol]();
|
||||
}
|
||||
}
|
||||
|
||||
//// [superSymbolIndexedAccess6.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var symbol;
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
Foo[symbol] = function () {
|
||||
return 0;
|
||||
};
|
||||
return Foo;
|
||||
})();
|
||||
var Bar = (function (_super) {
|
||||
__extends(Bar, _super);
|
||||
function Bar() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
Bar[symbol] = function () {
|
||||
return _super[symbol]();
|
||||
};
|
||||
return Bar;
|
||||
})(Foo);
|
||||
26
tests/baselines/reference/superSymbolIndexedAccess6.symbols
Normal file
26
tests/baselines/reference/superSymbolIndexedAccess6.symbols
Normal file
@@ -0,0 +1,26 @@
|
||||
=== tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts ===
|
||||
var symbol: any;
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess6.ts, 0, 3))
|
||||
|
||||
class Foo {
|
||||
>Foo : Symbol(Foo, Decl(superSymbolIndexedAccess6.ts, 0, 16))
|
||||
|
||||
static [symbol]() {
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess6.ts, 0, 3))
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
>Bar : Symbol(Bar, Decl(superSymbolIndexedAccess6.ts, 6, 1))
|
||||
>Foo : Symbol(Foo, Decl(superSymbolIndexedAccess6.ts, 0, 16))
|
||||
|
||||
static [symbol]() {
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess6.ts, 0, 3))
|
||||
|
||||
return super[symbol]();
|
||||
>super : Symbol(Foo, Decl(superSymbolIndexedAccess6.ts, 0, 16))
|
||||
>symbol : Symbol(symbol, Decl(superSymbolIndexedAccess6.ts, 0, 3))
|
||||
}
|
||||
}
|
||||
29
tests/baselines/reference/superSymbolIndexedAccess6.types
Normal file
29
tests/baselines/reference/superSymbolIndexedAccess6.types
Normal file
@@ -0,0 +1,29 @@
|
||||
=== tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts ===
|
||||
var symbol: any;
|
||||
>symbol : any
|
||||
|
||||
class Foo {
|
||||
>Foo : Foo
|
||||
|
||||
static [symbol]() {
|
||||
>symbol : any
|
||||
|
||||
return 0;
|
||||
>0 : number
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
>Bar : Bar
|
||||
>Foo : Foo
|
||||
|
||||
static [symbol]() {
|
||||
>symbol : any
|
||||
|
||||
return super[symbol]();
|
||||
>super[symbol]() : any
|
||||
>super[symbol] : any
|
||||
>super : typeof Foo
|
||||
>symbol : any
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//@target: ES5
|
||||
var symbol: any;
|
||||
|
||||
class Foo {
|
||||
[symbol]() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
[symbol]() {
|
||||
return super[symbol]();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//@target: ES5
|
||||
var symbol: any;
|
||||
|
||||
class Foo {
|
||||
static [symbol]() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
static [symbol]() {
|
||||
return super[symbol]();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user