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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2992263002: Implement type inference for super initializers. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | 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 fasta.body_builder; 5 library fasta.body_builder;
6 6
7 import 'package:kernel/ast.dart' 7 import 'package:kernel/ast.dart'
8 hide InvalidExpression, InvalidInitializer, InvalidStatement; 8 hide InvalidExpression, InvalidInitializer, InvalidStatement;
9 9
10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; 10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
(...skipping 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 Initializer buildSuperInitializer( 3197 Initializer buildSuperInitializer(
3198 bool isSynthetic, Constructor constructor, Arguments arguments, 3198 bool isSynthetic, Constructor constructor, Arguments arguments,
3199 [int charOffset = -1]) { 3199 [int charOffset = -1]) {
3200 if (member.isConst && !constructor.isConst) { 3200 if (member.isConst && !constructor.isConst) {
3201 return buildInvalidInitializer( 3201 return buildInvalidInitializer(
3202 deprecated_buildCompileTimeError( 3202 deprecated_buildCompileTimeError(
3203 "Super constructor isn't const.", charOffset), 3203 "Super constructor isn't const.", charOffset),
3204 charOffset); 3204 charOffset);
3205 } 3205 }
3206 needsImplicitSuperInitializer = false; 3206 needsImplicitSuperInitializer = false;
3207 return new SuperInitializer(constructor, arguments) 3207 return new KernelSuperInitializer(constructor, arguments)
3208 ..fileOffset = charOffset 3208 ..fileOffset = charOffset
3209 ..isSynthetic = isSynthetic; 3209 ..isSynthetic = isSynthetic;
3210 } 3210 }
3211 3211
3212 @override 3212 @override
3213 Initializer buildRedirectingInitializer( 3213 Initializer buildRedirectingInitializer(
3214 Constructor constructor, Arguments arguments, 3214 Constructor constructor, Arguments arguments,
3215 [int charOffset = -1]) { 3215 [int charOffset = -1]) {
3216 needsImplicitSuperInitializer = false; 3216 needsImplicitSuperInitializer = false;
3217 return new KernelRedirectingInitializer(constructor, arguments) 3217 return new KernelRedirectingInitializer(constructor, arguments)
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 return AsyncMarker.Async; 3800 return AsyncMarker.Async;
3801 } else { 3801 } else {
3802 assert(identical(starToken.stringValue, "*")); 3802 assert(identical(starToken.stringValue, "*"));
3803 return AsyncMarker.AsyncStar; 3803 return AsyncMarker.AsyncStar;
3804 } 3804 }
3805 } else { 3805 } else {
3806 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens", 3806 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens",
3807 asyncToken.charOffset, null); 3807 asyncToken.charOffset, null);
3808 } 3808 }
3809 } 3809 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698