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

Unified Diff: samples/meta/meta_sample.dart

Issue 10960055: Creating a CL to demonstrate the use of the package:meta/meta.dart package. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « no previous file | samples/meta/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/meta/meta_sample.dart
===================================================================
--- samples/meta/meta_sample.dart (revision 0)
+++ samples/meta/meta_sample.dart (revision 0)
@@ -0,0 +1,33 @@
+
+#import("package:meta/meta.dart");
+
+
+// The Editor will display calls to imDeprecated() in strikeout.
+@deprecated
+void imDeprecated() {
+ print("I'm deprecated!");
+}
+
+
+abstract class Animal {
+ int legCount();
+}
+
+
+class Dog extends Animal {
+ @override
+ int legCount() => 4;
+
+ // The Editor will warn about this, as no parent method is overridden.
+ @override
+ void bark() => print("bark!");
+}
+
+
+void main() {
+ imDeprecated();
+
+ Dog dog = new Dog();
+
+ dog.bark();
+}
« no previous file with comments | « no previous file | samples/meta/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698