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

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

Issue 9664029: Fix type check to perform a subtype test at top level instead of an (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/co19/co19-runtime.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/NamedParametersTypeTest.dart
===================================================================
--- tests/language/src/NamedParametersTypeTest.dart (revision 5412)
+++ tests/language/src/NamedParametersTypeTest.dart (working copy)
@@ -18,19 +18,25 @@
anyFunction = funNumBool; // No error.
anyFunction = funNumOptBool; // No error.
anyFunction = funNumOptBoolX; // No error.
- acceptFunNumOptBool(funNum); // No error.
acceptFunNumOptBool(funNumOptBool); // No error.
try {
- acceptFunNumOptBool(funNumBool); /// static type warning
+ acceptFunNumOptBool(funNum); // No static type warning.
} catch (TypeError error) {
result += 1;
Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
+ Expect.stringEquals("(num) => void", error.srcType);
+ }
+ try {
+ acceptFunNumOptBool(funNumBool); /// static type warning
+ } catch (TypeError error) {
+ result += 10;
+ Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
Expect.stringEquals("(num, bool) => void", error.srcType);
}
try {
acceptFunNumOptBool(funNumOptBoolX); /// static type warning
} catch (TypeError error) {
- result += 10;
+ result += 100;
Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
Expect.stringEquals("(num, [x: bool]) => void", error.srcType);
}
@@ -39,5 +45,5 @@
}
main() {
- Expect.equals(11, NamedParametersTypeTest.testMain());
+ Expect.equals(111, NamedParametersTypeTest.testMain());
}
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698