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

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

Issue 1560343002: Test and fix resynthesized function-typed parameters referring to type parameters. (Closed) Base URL: git@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/summary/resynthesize.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) 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/src/generated/element.dart'; 7 import 'package:analyzer/src/generated/element.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/summary/base.dart'; 9 import 'package:analyzer/src/summary/base.dart';
10 import 'package:analyzer/src/summary/format.dart'; 10 import 'package:analyzer/src/summary/format.dart';
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 823
824 test_library_named() { 824 test_library_named() {
825 checkLibrary('library foo.bar;'); 825 checkLibrary('library foo.bar;');
826 } 826 }
827 827
828 test_method_parameter_parameters() { 828 test_method_parameter_parameters() {
829 checkLibrary('class C { f(g(x, y)) {} }'); 829 checkLibrary('class C { f(g(x, y)) {} }');
830 } 830 }
831 831
832 test_method_parameter_parameters_in_generic_class() {
833 checkLibrary('class C<A, B> { f(A g(B x)) {} }');
834 }
835
832 test_method_parameter_return_type() { 836 test_method_parameter_return_type() {
833 checkLibrary('class C { f(int g()) {} }'); 837 checkLibrary('class C { f(int g()) {} }');
834 } 838 }
835 839
836 test_method_parameter_return_type_void() { 840 test_method_parameter_return_type_void() {
837 checkLibrary('class C { f(void g()) {} }'); 841 checkLibrary('class C { f(void g()) {} }');
838 } 842 }
839 843
840 test_operator() { 844 test_operator() {
841 checkLibrary('class C { C operator+(C other) => null; }'); 845 checkLibrary('class C { C operator+(C other) => null; }');
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 } 1014 }
1011 1015
1012 test_type_unresolved_prefixed() { 1016 test_type_unresolved_prefixed() {
1013 checkLibrary('import "dart:core" as core; core.C c;', allowErrors: true); 1017 checkLibrary('import "dart:core" as core; core.C c;', allowErrors: true);
1014 } 1018 }
1015 1019
1016 test_typedef_parameter_parameters() { 1020 test_typedef_parameter_parameters() {
1017 checkLibrary('typedef F(g(x, y));'); 1021 checkLibrary('typedef F(g(x, y));');
1018 } 1022 }
1019 1023
1024 test_typedef_parameter_parameters_in_generic_class() {
1025 checkLibrary('typedef F<A, B>(A g(B x));');
1026 }
1027
1020 test_typedef_parameter_return_type() { 1028 test_typedef_parameter_return_type() {
1021 checkLibrary('typedef F(int g());'); 1029 checkLibrary('typedef F(int g());');
1022 } 1030 }
1023 1031
1024 test_typedef_parameter_type() { 1032 test_typedef_parameter_type() {
1025 checkLibrary('typedef F(int i);'); 1033 checkLibrary('typedef F(int i);');
1026 } 1034 }
1027 1035
1028 test_typedef_parameter_type_generic() { 1036 test_typedef_parameter_type_generic() {
1029 checkLibrary('typedef F<T>(T t);'); 1037 checkLibrary('typedef F<T>(T t);');
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 } 1078 }
1071 1079
1072 test_variable_const() { 1080 test_variable_const() {
1073 checkLibrary('const int i = 0;'); 1081 checkLibrary('const int i = 0;');
1074 } 1082 }
1075 1083
1076 test_variables() { 1084 test_variables() {
1077 checkLibrary('int i; int j;'); 1085 checkLibrary('int i; int j;');
1078 } 1086 }
1079 } 1087 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698