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

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

Issue 1598773004: Do not produce hint on constructor when class is deprectated (issue 25503) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/generated/resolver.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.resolver_test; 5 library analyzer.test.generated.resolver_test;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
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 6626 matching lines...) Expand 10 before | Expand all | Expand 10 after
6637 Source source = addSource(r''' 6637 Source source = addSource(r'''
6638 const bool DEBUG = true; 6638 const bool DEBUG = true;
6639 f() { 6639 f() {
6640 bool b = DEBUG || true; 6640 bool b = DEBUG || true;
6641 }'''); 6641 }''');
6642 computeLibrarySourceErrors(source); 6642 computeLibrarySourceErrors(source);
6643 assertNoErrors(source); 6643 assertNoErrors(source);
6644 verify([source]); 6644 verify([source]);
6645 } 6645 }
6646 6646
6647 void test_deprecatedAnnotationUse_classWithConstructor() {
6648 Source source = addSource(r'''
6649 @deprecated
6650 class C {
6651 C();
6652 }
6653 ''');
6654 computeLibrarySourceErrors(source);
6655 assertNoErrors(source);
6656 verify([source]);
6657 }
6658
6647 void test_divisionOptimization() { 6659 void test_divisionOptimization() {
6648 Source source = addSource(r''' 6660 Source source = addSource(r'''
6649 f(int x, int y) { 6661 f(int x, int y) {
6650 var v = x / y.toInt(); 6662 var v = x / y.toInt();
6651 }'''); 6663 }''');
6652 computeLibrarySourceErrors(source); 6664 computeLibrarySourceErrors(source);
6653 assertNoErrors(source); 6665 assertNoErrors(source);
6654 verify([source]); 6666 verify([source]);
6655 } 6667 }
6656 6668
(...skipping 10227 matching lines...) Expand 10 before | Expand all | Expand 10 after
16884 16896
16885 void _resolveTestUnit(String code) { 16897 void _resolveTestUnit(String code) {
16886 testCode = code; 16898 testCode = code;
16887 testSource = addSource(testCode); 16899 testSource = addSource(testCode);
16888 LibraryElement library = resolve2(testSource); 16900 LibraryElement library = resolve2(testSource);
16889 assertNoErrors(testSource); 16901 assertNoErrors(testSource);
16890 verify([testSource]); 16902 verify([testSource]);
16891 testUnit = resolveCompilationUnit(testSource, library); 16903 testUnit = resolveCompilationUnit(testSource, library);
16892 } 16904 }
16893 } 16905 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698