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

Side by Side Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1846703002: Fix for infinite resursion while finding a concrete method. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.test.generated.compile_time_error_code_test; 5 library analyzer.test.generated.compile_time_error_code_test;
6 6
7 import 'package:analyzer/src/generated/engine.dart'; 7 import 'package:analyzer/src/generated/engine.dart';
8 import 'package:analyzer/src/generated/error.dart'; 8 import 'package:analyzer/src/generated/error.dart';
9 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 9 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
10 import 'package:analyzer/src/generated/source_io.dart'; 10 import 'package:analyzer/src/generated/source_io.dart';
(...skipping 5460 matching lines...) Expand 10 before | Expand all | Expand 10 after
5471 5471
5472 void test_recursiveInterfaceInheritanceBaseCaseExtends() { 5472 void test_recursiveInterfaceInheritanceBaseCaseExtends() {
5473 Source source = addSource("class A extends A {}"); 5473 Source source = addSource("class A extends A {}");
5474 computeLibrarySourceErrors(source); 5474 computeLibrarySourceErrors(source);
5475 assertErrors(source, [ 5475 assertErrors(source, [
5476 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS 5476 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
5477 ]); 5477 ]);
5478 verify([source]); 5478 verify([source]);
5479 } 5479 }
5480 5480
5481 void test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() {
5482 Source source = addSource(r'''
5483 class C extends C {
5484 var bar = 0;
5485 m();
5486 }
5487 ''');
5488 computeLibrarySourceErrors(source);
5489 assertErrors(source, [
5490 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
5491 StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
5492 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
5493 ]);
5494 verify([source]);
5495 }
5496
5481 void test_recursiveInterfaceInheritanceBaseCaseImplements() { 5497 void test_recursiveInterfaceInheritanceBaseCaseImplements() {
5482 Source source = addSource("class A implements A {}"); 5498 Source source = addSource("class A implements A {}");
5483 computeLibrarySourceErrors(source); 5499 computeLibrarySourceErrors(source);
5484 assertErrors(source, [ 5500 assertErrors(source, [
5485 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS 5501 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
5486 ]); 5502 ]);
5487 verify([source]); 5503 verify([source]);
5488 } 5504 }
5489 5505
5490 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() { 5506 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() {
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
6321 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); 6337 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
6322 verify([source]); 6338 verify([source]);
6323 reset(); 6339 reset();
6324 } 6340 }
6325 6341
6326 void _check_wrongNumberOfParametersForOperator1(String name) { 6342 void _check_wrongNumberOfParametersForOperator1(String name) {
6327 _check_wrongNumberOfParametersForOperator(name, ""); 6343 _check_wrongNumberOfParametersForOperator(name, "");
6328 _check_wrongNumberOfParametersForOperator(name, "a, b"); 6344 _check_wrongNumberOfParametersForOperator(name, "a, b");
6329 } 6345 }
6330 } 6346 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698