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

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

Issue 9186015: Issue 933: Fix for resolving type of Function in field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rollback TypeTestCase change Created 8 years, 11 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/language-leg.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/FunctionFieldTest.dart
diff --git a/tests/language/src/FunctionFieldTest.dart b/tests/language/src/FunctionFieldTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..8c44b173cb8719019983a114501158074ceac9ba
--- /dev/null
+++ b/tests/language/src/FunctionFieldTest.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2011, 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.
+// VMOptions=--fatal-type-errors --enable_type_checks
regis 2012/02/23 19:42:09 The VM does not support --fatal-type-errors.
zundel 2012/02/24 15:38:57 VMOptions is kind of a misnomer in that they are j
+//
+// Test of calling Function, which is field of some class.
+
+class Wrapper {
+ Function f;
+}
+
+main() {
+ Wrapper w = new Wrapper();
+ w.f = () {return 42;};
+ Expect.equals(42, w.f());
+}
« no previous file with comments | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698