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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2531333006: Avoid a crash during summary linking when there are inheritance errors. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after
3618 } 3618 }
3619 3619
3620 void test_inferredType_usesSyntheticFunctionType_functionTypedParam() { 3620 void test_inferredType_usesSyntheticFunctionType_functionTypedParam() {
3621 checkLibrary(''' 3621 checkLibrary('''
3622 int f(int x(String y)) => null; 3622 int f(int x(String y)) => null;
3623 String g(int x(String y)) => null; 3623 String g(int x(String y)) => null;
3624 var v = [f, g]; 3624 var v = [f, g];
3625 '''); 3625 ''');
3626 } 3626 }
3627 3627
3628 test_inheritance_errors() {
3629 checkLibrary('''
3630 abstract class A {
3631 int m();
3632 }
3633
3634 abstract class B {
3635 String m();
3636 }
3637
3638 abstract class C implements A, B {}
3639
3640 abstract class D extends C {
3641 var f;
3642 }
3643 ''');
3644 }
3645
3628 test_initializer_executable_with_return_type_from_closure() { 3646 test_initializer_executable_with_return_type_from_closure() {
3629 checkLibrary('var v = () => 0;'); 3647 checkLibrary('var v = () => 0;');
3630 } 3648 }
3631 3649
3632 test_initializer_executable_with_return_type_from_closure_field() { 3650 test_initializer_executable_with_return_type_from_closure_field() {
3633 checkLibrary(''' 3651 checkLibrary('''
3634 class C { 3652 class C {
3635 var v = () => 0; 3653 var v = () => 0;
3636 } 3654 }
3637 '''); 3655 ''');
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4759 fail('Unexpectedly tried to get unlinked summary for $uri'); 4777 fail('Unexpectedly tried to get unlinked summary for $uri');
4760 } 4778 }
4761 return serializedUnit; 4779 return serializedUnit;
4762 } 4780 }
4763 4781
4764 @override 4782 @override
4765 bool hasLibrarySummary(String uri) { 4783 bool hasLibrarySummary(String uri) {
4766 return true; 4784 return true;
4767 } 4785 }
4768 } 4786 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698