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

Unified Diff: tests/language/src/Factory2Test.dart

Issue 9582027: Some use of the new @static-clean and /// annotations in shared tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | « tests/language/src/DynamicTest.dart ('k') | tests/language/src/ImplementTypeParameterNegativeTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/Factory2Test.dart
diff --git a/tests/language/src/Factory2Test.dart b/tests/language/src/Factory2Test.dart
index 3b375819b806fb03ae629085941cd5fc9eeab024..2d647ff3ca8ca4c2ef93efc350a0bff29f0ce361 100644
--- a/tests/language/src/Factory2Test.dart
+++ b/tests/language/src/Factory2Test.dart
@@ -1,10 +1,13 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Dart test program for testing factories.
+
+// Dart test program for testing default keyword on interfaces
+// Test case for issues 500 and 512
interface Link<T> extends Iterable<T> default LinkFactory<T> {
- Link(T head, [Link<T> tail]);
+ // does not match constructor for LinkFactory
+ Link(T head, [Link<T> tail]); /// static type error
Link<T> prepend(T element);
}
@@ -17,28 +20,35 @@ class LinkFactory<T> {
}
}
-class AbstractLink<T> implements Link<T> {
+// Does not implement all of Iterable
+class AbstractLink<T> implements Link<T> { /// static type error
const AbstractLink();
Link<T> prepend(T element) {
return new Link<T>(element, this);
}
}
-class LinkTail<T> extends AbstractLink<T> implements EmptyLink<T> {
+// Does not implement all of Iterable
+class LinkTail<T> extends AbstractLink<T> /// static type error
+ implements EmptyLink<T> {
const LinkTail();
}
-class LinkEntry<T> extends AbstractLink<T> {
+// Does not implement all of Iterable
+class LinkEntry<T> extends AbstractLink<T> { /// static type error
LinkEntry(T head, Link<T> realTail);
}
class Fisk {
- Link<String> nodes = const EmptyLink();
+ // instantiation of abstract class
+ Link<String> nodes = const EmptyLink(); /// static type error
}
main() {
new Fisk();
- new EmptyLink<String>().prepend('hest');
- const EmptyLink<String>().prepend('fisk');
+ // instantiation of abstract class
+ new EmptyLink<String>().prepend('hest'); /// static type error
+ // instantiation of abstract class
+ const EmptyLink<String>().prepend('fisk'); /// static type error
}
« no previous file with comments | « tests/language/src/DynamicTest.dart ('k') | tests/language/src/ImplementTypeParameterNegativeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698