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

Side by Side Diff: tests/compiler/dart2js/kernel/test_helpers.dart

Issue 2939063002: Strong mode cleaning of many dart2js tests. (Closed)
Patch Set: Use ClassElement. Created 3 years, 6 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 dart2js.kernel.equivalence; 5 library dart2js.kernel.equivalence;
6 6
7 import 'package:compiler/src/common/backend_api.dart'; 7 import 'package:compiler/src/common/backend_api.dart';
8 import 'package:compiler/src/common/resolution.dart'; 8 import 'package:compiler/src/common/resolution.dart';
9 import 'package:compiler/src/common/work.dart'; 9 import 'package:compiler/src/common/work.dart';
10 import 'package:compiler/src/constants/expressions.dart'; 10 import 'package:compiler/src/constants/expressions.dart';
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 /// Visitor the performers unaliasing of all typedefs nested within a 249 /// Visitor the performers unaliasing of all typedefs nested within a
250 /// [ResolutionDartType]. 250 /// [ResolutionDartType].
251 class Unaliaser 251 class Unaliaser
252 extends BaseResolutionDartTypeVisitor<dynamic, ResolutionDartType> { 252 extends BaseResolutionDartTypeVisitor<dynamic, ResolutionDartType> {
253 const Unaliaser(); 253 const Unaliaser();
254 254
255 @override 255 @override
256 ResolutionDartType visit(ResolutionDartType type, [_]) => 256 ResolutionDartType visit(ResolutionDartType type, [_]) =>
257 // ignore: ARGUMENT_TYPE_NOT_ASSIGNABLE
257 type.accept(this, null); 258 type.accept(this, null);
258 259
259 @override 260 @override
260 ResolutionDartType visitType(ResolutionDartType type, _) => type; 261 ResolutionDartType visitType(ResolutionDartType type, _) => type;
261 262
262 List<ResolutionDartType> visitList(List<ResolutionDartType> types) => 263 List<ResolutionDartType> visitList(List<ResolutionDartType> types) =>
263 types.map(visit).toList(); 264 types.map(visit).toList();
264 265
265 @override 266 @override
266 ResolutionDartType visitInterfaceType(ResolutionInterfaceType type, _) { 267 ResolutionDartType visitInterfaceType(ResolutionInterfaceType type, _) {
(...skipping 30 matching lines...) Expand all
297 for (ConstructorElement constructor in element.constructors) { 298 for (ConstructorElement constructor in element.constructors) {
298 if (!constructor.isRedirectingFactory) { 299 if (!constructor.isRedirectingFactory) {
299 return true; 300 return true;
300 } 301 }
301 } 302 }
302 // The class cannot itself be instantiated. 303 // The class cannot itself be instantiated.
303 return false; 304 return false;
304 } 305 }
305 return true; 306 return true;
306 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698