Skip to content

Commit

Permalink
Adjust error message text to match implementation. (#5406)
Browse files Browse the repository at this point in the history
https://dart-review.googlesource.com/c/sdk/+/337609 made a small change
in the context message that the analyzer and CFE generate when field
promotion fails due to the member in question being public. Previously
the message referred to the non-promoting members as a `public field`.
Now it refers to it as a `public property` (because in certain
circumstances, private properties *are* promotable).

This small change in the context message text doesn't really have any
impact on the advice we want to give to users about field promotability,
but it's nice for the documentation to match the implementation's output
as closely as possible.
  • Loading branch information
stereotype441 authored Dec 13, 2023
1 parent 2094ca5 commit fc2d4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/non-promotion-reasons.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ test(C c) {
**Message:**

```nocode
'n' refers to a public field so it couldn’t be promoted.
'n' refers to a public property so it couldn’t be promoted.
```

**Solution:**
Expand Down

0 comments on commit fc2d4d8

Please sign in to comment.