| Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| index 1b755f930fd27531eb65954579648e77d48b0f6b..c71d7915fb642227219efc65afc8991789be056e 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -889,6 +889,23 @@ foo(var p) {
|
| verify([source]);
|
| }
|
|
|
| + test_constConstructor_redirect_generic() async {
|
| + Source source = addSource(r'''
|
| +class A<T> {
|
| + const A(T value) : this._(value);
|
| + const A._(T value) : value = value;
|
| + final T value;
|
| +}
|
| +
|
| +void main(){
|
| + const A<int>(1);
|
| +}
|
| +''');
|
| + await computeAnalysisResult(source);
|
| + assertNoErrors(source);
|
| + verify([source]);
|
| + }
|
| +
|
| test_constConstructorWithFieldInitializedByNonConst() async {
|
| Source source = addSource(r'''
|
| class A {
|
| @@ -1260,25 +1277,6 @@ class A {
|
| verify([source]);
|
| }
|
|
|
| - test_nonConstValueInInitializer_instanceCreation_inDifferentFile() async {
|
| - resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
|
| - Source source = addNamedSource(
|
| - '/a.dart',
|
| - r'''
|
| -import 'b.dart';
|
| -const v = const MyClass();
|
| -''');
|
| - addNamedSource(
|
| - '/b.dart',
|
| - r'''
|
| -class MyClass {
|
| - const MyClass([p = foo]);
|
| -}
|
| -''');
|
| - await computeAnalysisResult(source);
|
| - assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
|
| - }
|
| -
|
| test_constInitializedWithNonConstValue() async {
|
| Source source = addSource(r'''
|
| f(p) {
|
| @@ -4803,6 +4801,25 @@ var b = const B();''');
|
| verify([source]);
|
| }
|
|
|
| + test_nonConstValueInInitializer_instanceCreation_inDifferentFile() async {
|
| + resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
|
| + Source source = addNamedSource(
|
| + '/a.dart',
|
| + r'''
|
| +import 'b.dart';
|
| +const v = const MyClass();
|
| +''');
|
| + addNamedSource(
|
| + '/b.dart',
|
| + r'''
|
| +class MyClass {
|
| + const MyClass([p = foo]);
|
| +}
|
| +''');
|
| + await computeAnalysisResult(source);
|
| + assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
|
| + }
|
| +
|
| test_nonConstValueInInitializer_redirecting() async {
|
| Source source = addSource(r'''
|
| class A {
|
|
|