CHANGELOG entry and commit message should explain that it is no longer safe to assume that there is a single instance of `DynamicType`, `NeverType`, and `VoidType`.
/// The unique instance of this class.This doc comment is now incorrect. Same problem with `NeverTypeImpl` and `VoidTypeImpl`.
Should we consider deprecating or removing this field entirely to avoid confusion?
if (T is DynamicTypeImpl) {In some parts of this CL, `identical(t, DynamicTypeImpl.instance)` is changed to `t == DynamicTypeImpl.instance`; in other parts (like here), it is changed to `t is DynamicTypeImpl`. Which is better, and why? The CL should pick one consistent approach, and it should be documented in the commit message (as well as the CHANGELOG, so that authors of analyzer clients know what to do).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
CHANGELOG entry and commit message should explain that it is no longer safe to assume that there is a single instance of `DynamicType`, `NeverType`, and `VoidType`.
Done.
This doc comment is now incorrect. Same problem with `NeverTypeImpl` and `VoidTypeImpl`.
Should we consider deprecating or removing this field entirely to avoid confusion?
I updated the comments.
We still need values for comparison.
In some parts of this CL, `identical(t, DynamicTypeImpl.instance)` is changed to `t == DynamicTypeImpl.instance`; in other parts (like here), it is changed to `t is DynamicTypeImpl`. Which is better, and why? The CL should pick one consistent approach, and it should be documented in the commit message (as well as the CHANGELOG, so that authors of analyzer clients know what to do).
Authors of the analyzer clients don't get access to `DynamicTypeImpl.instance`.
`t is DynamicTypeImpl` is better, just one type check, no virtual method invocation.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm assuming commit message and CHANGELOG are updated.
or equality operators (`==`) instead of `identical()`.Since you have decided that using `is` checks is better (and I agree with your reasoning), the commit message and the CHANGELOG should reflect this decision. Don't suggest using equality operators.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
5 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: pkg/analyzer/CHANGELOG.md
Insertions: 1, Deletions: 3.
@@ -1,9 +1,7 @@
## 12.1.0-dev
* Support type aliases for `dynamic`, `Never`, and `void`. As a result, it is no longer safe to assume that
- there is a single instance of `DynamicType`, `NeverType`, or `VoidType`. Use type checks (`is DynamicType`)
- or equality operators (`==`) instead of `identical()`.
-
+ there is a single instance of `DynamicType`, `NeverType`, or `VoidType`. Use type checks (`is DynamicType`) instead of `identical()`.
## 12.0.0
```
Elements. Issue 62826. Support aliases for DynamicType, NeverType, VoidType.
As a result, it is no longer safe to assume that
there is a single instance of `DynamicType`, `NeverType`, or `VoidType`. Use type checks (`is DynamicType`) instead of `identical()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |