Index: pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart |
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart |
index 6a7256c451b6760aa28d40c98fe80282fe68c1bd..fa24d557e3832e11cf7ea561757b646a17e209bd 100644 |
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart |
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart |
@@ -575,9 +575,25 @@ class A { |
} |
var v = const A.a1(0);'''); |
await computeAnalysisResult(source); |
- assertErrors(source, [ |
- CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH |
- ]); |
+ assertErrors( |
+ source, [CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]); |
+ verify([source]); |
+ } |
+ |
+ test_superConstructor_paramTypeMismatch() async { |
+ Source source = addSource(r''' |
+class C { |
+ final double d; |
+ const C(this.d); |
+} |
+class D extends C { |
+ const D(d) : super(d); |
+} |
+const f = const D(0); |
+'''); |
+ await computeAnalysisResult(source); |
+ assertErrors( |
+ source, [CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]); |
verify([source]); |
} |