17 lines
483 B
Plaintext
17 lines
483 B
Plaintext
|
==== tests/cases/compiler/setterWithReturn.ts (3 errors) ====
|
||
|
class C234 {
|
||
|
public set p1(arg1) {
|
||
|
~~
|
||
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
||
|
if (true) {
|
||
|
return arg1;
|
||
|
~~~~
|
||
|
!!! Setters cannot return a value.
|
||
|
}
|
||
|
else {
|
||
|
return 0;
|
||
|
~
|
||
|
!!! Setters cannot return a value.
|
||
|
}
|
||
|
}
|
||
|
}
|