TypeScript/tests/baselines/reference/returnValueInSetter.errors.txt

12 lines
331 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/returnValueInSetter.ts (2 errors) ====
class f {
set x(value) {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return null; // Should be an error
~~~~
!!! Setters cannot return a value.
}
}