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

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

Issue 1142853002: Handle type parameters correctly when generating hints (issue 23243) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/element_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 engine.resolver_test; 5 library engine.resolver_test;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 6883 matching lines...) Expand 10 before | Expand all | Expand 10 after
6894 } 6894 }
6895 f(var a, var a2) { 6895 f(var a, var a2) {
6896 a = new A(); 6896 a = new A();
6897 a2 = new A(); 6897 a2 = new A();
6898 a += a2; 6898 a += a2;
6899 }'''); 6899 }''');
6900 resolve(source); 6900 resolve(source);
6901 assertNoErrors(source); 6901 assertNoErrors(source);
6902 } 6902 }
6903 6903
6904 void test_undefinedMethod_dynamic() {
6905 Source source = addSource(r'''
6906 class D<T extends dynamic> {
6907 fieldAccess(T t) => t.abc;
6908 methodAccess(T t) => t.xyz(1, 2, 'three');
6909 }''');
6910 resolve(source);
6911 assertNoErrors(source);
6912 }
6913
6904 void test_undefinedMethod_inSubtype() { 6914 void test_undefinedMethod_inSubtype() {
6905 Source source = addSource(r''' 6915 Source source = addSource(r'''
6906 class A {} 6916 class A {}
6907 class B extends A { 6917 class B extends A {
6908 b() {} 6918 b() {}
6909 } 6919 }
6910 f() { 6920 f() {
6911 var a = new A(); 6921 var a = new A();
6912 a.b(); 6922 a.b();
6913 }'''); 6923 }''');
(...skipping 6873 matching lines...) Expand 10 before | Expand all | Expand 10 after
13787 // check propagated type 13797 // check propagated type
13788 FunctionType propagatedType = node.propagatedType as FunctionType; 13798 FunctionType propagatedType = node.propagatedType as FunctionType;
13789 expect(propagatedType.returnType, test.typeProvider.stringType); 13799 expect(propagatedType.returnType, test.typeProvider.stringType);
13790 } on AnalysisException catch (e, stackTrace) { 13800 } on AnalysisException catch (e, stackTrace) {
13791 thrownException[0] = new CaughtException(e, stackTrace); 13801 thrownException[0] = new CaughtException(e, stackTrace);
13792 } 13802 }
13793 } 13803 }
13794 return null; 13804 return null;
13795 } 13805 }
13796 } 13806 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698