[release] Add changelog entry for breaking mirrors change

TBR=vegorov@google.com

Change-Id: I38d43e86fce90d22672eaf2386a82135772e7345
Reviewed-on: https://dart-review.googlesource.com/c/89287
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Alexander Thomas 2019-01-14 16:19:47 +00:00
parent 37fba56cdc
commit 3104aea6f7

View file

@ -40,6 +40,31 @@
## 2.1.1-dev.1.0
### Dart VM
In previous releases it was possible to violate static types using dart:mirrors but this bug is fixed now. Meaning that the code below would run without any TypeErrors and print "impossible" output.
```dart
import 'dart:mirrors';
class A {
void method(int v) {
if (v != null && v is! int) {
print("This should be impossible: expected null or int got ${v}");
}
}
}
void main() {
final obj = A();
reflect(obj).invoke(#method, ['not-an-number']);
}
```
Only code that already violates static typing will break.
See Issue [#35611](https://github.com/dart-lang/sdk/issues/35611) for more details.
### Tool Changes
#### Analyzer