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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 640813004: Handle non-factory redirects in constant evaluation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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: pkg/analyzer/test/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 6c7e93cfdbdecb2a9faed619ecdb4de646faa5b1..eea44007305ba4674027918cc401c5b02e75a856 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -842,6 +842,19 @@ class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
+ void test_redirectingConstructor_paramTypeMismatch() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " const A.a1(x) : this.a2(x);",
+ " const A.a2(String x);",
+ "}",
+ "var v = const A.a1(0);"]));
+ resolve(source);
+ assertErrors(source, [
+ CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+ verify([source]);
+ }
+
void test_parameterAssignable_null() {
// Null is assignable to anything.
Source source = addSource(EngineTestCase.createSource([
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest.dart ('k') | tests/language/compile_time_constant_checked4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698