Using parameter properties outside of a constructor results in an incorrect diagnostic:
class A {
value: i32 = 0;
set bet(pubic v: i32) {}
}
This also happens with normal functions and arrow functions and when using private and protected
Actual
The following diagnostic is emitted: ) expected
Expected
Something more informative, such as:
A parameter property is only allowed in a constructor implementation.