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

Side by Side Diff: pkg/kernel/lib/transformations/reify/transformation/builder.dart

Issue 2725623002: Fix a type error in reify/transformation/builder.dart. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | 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) 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 kernel.transformations.reify.transformation.builder; 5 library kernel.transformations.reify.transformation.builder;
6 6
7 import '../asts.dart'; 7 import '../asts.dart';
8 import 'package:kernel/ast.dart'; 8 import 'package:kernel/ast.dart';
9 import 'dart:collection' show LinkedHashMap; 9 import 'dart:collection' show LinkedHashMap;
10 import 'binding.dart' show RuntimeLibrary; 10 import 'binding.dart' show RuntimeLibrary;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 .toList(); 436 .toList();
437 callableType = new FunctionType( 437 callableType = new FunctionType(
438 positionalArguments, function.returnType, 438 positionalArguments, function.returnType,
439 namedParameters: namedParameters, 439 namedParameters: namedParameters,
440 requiredParameterCount: function.requiredParameterCount); 440 requiredParameterCount: function.requiredParameterCount);
441 } 441 }
442 statements.add(new ExpressionStatement(createCallInit( 442 statements.add(new ExpressionStatement(createCallInit(
443 parameter, 443 parameter,
444 id, 444 id,
445 cls.supertype?.asInterfaceType, 445 cls.supertype?.asInterfaceType,
446 cls.implementedTypes.map((Supertype type) => type?.asInterfaceType), 446 cls.implementedTypes
447 .map((Supertype type) => type?.asInterfaceType)
448 .toList(),
447 callableType))); 449 callableType)));
448 }); 450 });
449 451
450 statements.add(new ReturnStatement(new VariableGet(parameter))); 452 statements.add(new ReturnStatement(new VariableGet(parameter)));
451 453
452 Expression function = new FunctionExpression(new FunctionNode( 454 Expression function = new FunctionExpression(new FunctionNode(
453 new Block(statements), 455 new Block(statements),
454 positionalParameters: <VariableDeclaration>[parameter], 456 positionalParameters: <VariableDeclaration>[parameter],
455 returnType: declarationType)); 457 returnType: declarationType));
456 458
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 declarations.type = declarationType; 504 declarations.type = declarationType;
503 } 505 }
504 506
505 Procedure createGetter( 507 Procedure createGetter(
506 Name name, Expression expression, Class cls, DartType type) { 508 Name name, Expression expression, Class cls, DartType type) {
507 return new Procedure(name, ProcedureKind.Getter, 509 return new Procedure(name, ProcedureKind.Getter,
508 new FunctionNode(new ReturnStatement(expression), returnType: type), 510 new FunctionNode(new ReturnStatement(expression), returnType: type),
509 fileUri: cls.fileUri); 511 fileUri: cls.fileUri);
510 } 512 }
511 } 513 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698