TypeScript/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt
2014-07-12 17:30:19 -07:00

64 lines
2.2 KiB
Plaintext

==== tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts (10 errors) ====
function _super() { // No error
}
class Foo {
get prop1(): number {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
function _super() { // No error
}
return 10;
}
set prop1(val: number) {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
function _super() { // No error
}
}
}
class b extends Foo {
get prop2(): number {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
function _super() { // Should be error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
return 10;
}
set prop2(val: number) {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
function _super() { // Should be error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
}
}
class c extends Foo {
get prop2(): number {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
var x = () => {
function _super() { // Should be error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~~~~~
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
}
return 10;
}
set prop2(val: number) {
~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
var x = () => {
function _super() { // Should be error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~~~~~
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
}
}
}