Named/optional arguments with constructor shorthand leaks impl details #1012
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
This issue was originally filed by [email protected]
What steps will reproduce the problem?
When using the constructor argument shorthand (this.variable) with optional/named arguments, the fact that the argument is being assigned to a private variable is leaked when the constructor is called.
In the example above, anyone who creates a new "SomeClass" object with a named parameter now knows that the argument is being assigned to a private variable (due to the "_" on the argument name).
The text was updated successfully, but these errors were encountered: