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

Unified Diff: frog/tests/leg_only/src/GenericsIsCheck1Test.dart

Issue 10232011: Implement simple dynamic type check. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor edits. Created 8 years, 8 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
Index: frog/tests/leg_only/src/GenericsIsCheck1Test.dart
diff --git a/frog/tests/leg_only/src/GenericsIsCheck1Test.dart b/frog/tests/leg_only/src/GenericsIsCheck1Test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..9aa45b8abace6a68a7c9195ad693513539e3b54c
--- /dev/null
+++ b/frog/tests/leg_only/src/GenericsIsCheck1Test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
kasperl 2012/04/30 08:48:32 Maybe rename this file? Didn't Siggi change the na
karlklose 2012/05/01 11:20:55 Done.
+// 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.
+// Test that parameters keep their names in the output.
kasperl 2012/04/30 08:48:32 Not sure I understand line 4 here. Get rid of it?
ngeoffray 2012/04/30 08:51:12 Update comment.
karlklose 2012/05/01 11:20:55 Done, removed.
+
+class Hest<X> {}
+
+main() {
+ var x = new Hest<int>();
+ Expect.isTrue(x is Hest<int>);
kasperl 2012/04/30 08:48:32 So would 'x is Hest<num>', 'x is Hest<Object>', 'x
karlklose 2012/05/01 11:20:55 It does not work currently.
+ Expect.isFalse(x is Hest<String>);
+}

Powered by Google App Engine
This is Rietveld 408576698