17 lines
No EOL
483 B
Text
17 lines
No EOL
483 B
Text
==== 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.
|
|
}
|
|
}
|
|
} |