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

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test_send_data.dart

Issue 1306143002: Remove SendResolver.computeSendStructure. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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 part of dart2js.semantics_visitor_test; 5 part of dart2js.semantics_visitor_test;
6 6
7 const Map<String, List<Test>> SEND_TESTS = const { 7 const Map<String, List<Test>> SEND_TESTS = const {
8 'Parameters': const [ 8 'Parameters': const [
9 // Parameters 9 // Parameters
10 const Test('m(o) => o;', 10 const Test('m(o) => o;',
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 const Visit(VisitKind.VISIT_THIS_GET)), 1100 const Visit(VisitKind.VISIT_THIS_GET)),
1101 const Test.clazz( 1101 const Test.clazz(
1102 ''' 1102 '''
1103 class C { 1103 class C {
1104 call(a, b) {} 1104 call(a, b) {}
1105 m() { this(null, 42); } 1105 m() { this(null, 42); }
1106 } 1106 }
1107 ''', 1107 ''',
1108 const Visit(VisitKind.VISIT_THIS_INVOKE, 1108 const Visit(VisitKind.VISIT_THIS_INVOKE,
1109 arguments: '(null,42)')), 1109 arguments: '(null,42)')),
1110 const Test.clazz(
1111 '''
1112 class C {
1113 call(a, b) {}
1114 static m() { this(null, 42); }
1115 }
1116 ''',
1117 const Visit(VisitKind.ERROR_INVALID_INVOKE,
1118 error: MessageKind.NO_THIS_AVAILABLE,
1119 arguments: '(null,42)')),
1110 ], 1120 ],
1111 'This properties': const [ 1121 'This properties': const [
1112 // This properties 1122 // This properties
1113 const Test.clazz( 1123 const Test.clazz(
1114 ''' 1124 '''
1115 class C { 1125 class C {
1116 var foo; 1126 var foo;
1117 m() => foo; 1127 m() => foo;
1118 } 1128 }
1119 ''', 1129 ''',
(...skipping 13 matching lines...) Expand all
1133 class C { 1143 class C {
1134 get foo => null; 1144 get foo => null;
1135 m() => foo; 1145 m() => foo;
1136 } 1146 }
1137 ''', 1147 ''',
1138 const Visit(VisitKind.VISIT_THIS_PROPERTY_GET, 1148 const Visit(VisitKind.VISIT_THIS_PROPERTY_GET,
1139 name: 'foo')), 1149 name: 'foo')),
1140 const Test.clazz( 1150 const Test.clazz(
1141 ''' 1151 '''
1142 class C { 1152 class C {
1153 var foo;
1154 static m() => this.foo;
1155 }
1156 ''',
1157 const Visit(VisitKind.ERROR_INVALID_GET,
1158 error: MessageKind.NO_THIS_AVAILABLE)),
1159 const Test.clazz(
1160 '''
1161 class C {
1143 get foo => null; 1162 get foo => null;
1144 m() => this.foo; 1163 m() => this.foo;
1145 } 1164 }
1146 ''', 1165 ''',
1147 const Visit(VisitKind.VISIT_THIS_PROPERTY_GET, 1166 const Visit(VisitKind.VISIT_THIS_PROPERTY_GET,
1148 name: 'foo')), 1167 name: 'foo')),
1149 const Test.clazz( 1168 const Test.clazz(
1150 ''' 1169 '''
1151 class C { 1170 class C {
1152 var foo; 1171 var foo;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 const Test.clazz( 1218 const Test.clazz(
1200 ''' 1219 '''
1201 class C { 1220 class C {
1202 var foo; 1221 var foo;
1203 m() { this.foo(null, 42); } 1222 m() { this.foo(null, 42); }
1204 } 1223 }
1205 ''', 1224 ''',
1206 const Visit(VisitKind.VISIT_THIS_PROPERTY_INVOKE, 1225 const Visit(VisitKind.VISIT_THIS_PROPERTY_INVOKE,
1207 name: 'foo', 1226 name: 'foo',
1208 arguments: '(null,42)')), 1227 arguments: '(null,42)')),
1228 const Test.clazz(
1229 '''
1230 class C {
1231 var foo;
1232 static m() { this.foo(null, 42); }
1233 }
1234 ''',
1235 const Visit(VisitKind.ERROR_INVALID_INVOKE,
1236 error: MessageKind.NO_THIS_AVAILABLE,
1237 arguments: '(null,42)')),
1209 ], 1238 ],
1210 'Super fields': const [ 1239 'Super fields': const [
1211 // Super fields 1240 // Super fields
1212 const Test.clazz( 1241 const Test.clazz(
1213 ''' 1242 '''
1214 class B { 1243 class B {
1215 var o; 1244 var o;
1216 } 1245 }
1217 class C extends B { 1246 class C extends B {
1218 m() => super.o; 1247 m() => super.o;
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
3958 rhs: '42')), 3987 rhs: '42')),
3959 const Test.prefix( 3988 const Test.prefix(
3960 ''' 3989 '''
3961 var o; 3990 var o;
3962 ''', 3991 ''',
3963 'm() => p?.o;', 3992 'm() => p?.o;',
3964 const Visit(VisitKind.ERROR_INVALID_GET, 3993 const Visit(VisitKind.ERROR_INVALID_GET,
3965 error: MessageKind.PREFIX_AS_EXPRESSION)), 3994 error: MessageKind.PREFIX_AS_EXPRESSION)),
3966 ], 3995 ],
3967 }; 3996 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698