Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: pkg/meta/CHANGELOG.md

Issue 2334413002: follow up for #25578, add `@checked` to package:meta (Closed)
Patch Set: fixed Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | pkg/meta/lib/meta.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/meta/CHANGELOG.md
diff --git a/pkg/meta/CHANGELOG.md b/pkg/meta/CHANGELOG.md
index 4a462d7e58e72e72d9b6cd3b871f169236347226..11e1a69c81cf99fc827820245f0e54edc6462a81 100644
--- a/pkg/meta/CHANGELOG.md
+++ b/pkg/meta/CHANGELOG.md
@@ -1,3 +1,23 @@
+## 1.0.3
+* Introduce `@checked` to override a method and tighten a parameter
+ type (SDK issue [25578](https://github.com/dart-lang/sdk/issues/25578)).
+
+ ```dart
+ import 'package:meta/meta.dart' show checked;
+ class View {
+ addChild(View v) {}
+ }
+ class MyView extends View {
+ // this override is legal, it will check at runtime if we actually
+ // got a MyView.
+ addChild(@checked MyView v) {}
+ }
+ main() {
+ dynamic mv = new MyView();
+ mv.addChild(new View()); // runtime error
+ }
+ ```
+
## 1.0.2
* Introduce `@visibleForTesting` annotation for declarations that may be referenced only in the library or in a test.
« no previous file with comments | « CHANGELOG.md ('k') | pkg/meta/lib/meta.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698