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

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

Issue 2994533002: Perform type inference on constructor field initializer expressions. (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 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3174 .withArguments(name), 3174 .withArguments(name),
3175 builder.charOffset); 3175 builder.charOffset);
3176 Builder constructor = 3176 Builder constructor =
3177 library.loader.getDuplicatedFieldInitializerError(); 3177 library.loader.getDuplicatedFieldInitializerError();
3178 return buildInvalidInitializer( 3178 return buildInvalidInitializer(
3179 new Throw(buildStaticInvocation(constructor.target, 3179 new Throw(buildStaticInvocation(constructor.target,
3180 new Arguments(<Expression>[new StringLiteral(name)]), 3180 new Arguments(<Expression>[new StringLiteral(name)]),
3181 charOffset: offset)), 3181 charOffset: offset)),
3182 offset); 3182 offset);
3183 } else { 3183 } else {
3184 return new FieldInitializer(builder.field, expression) 3184 return new KernelFieldInitializer(builder.field, expression)
3185 ..fileOffset = offset 3185 ..fileOffset = offset
3186 ..isSynthetic = isSynthetic; 3186 ..isSynthetic = isSynthetic;
3187 } 3187 }
3188 } else { 3188 } else {
3189 return buildInvalidInitializer( 3189 return buildInvalidInitializer(
3190 deprecated_buildCompileTimeError( 3190 deprecated_buildCompileTimeError(
3191 "'$name' isn't an instance field of this class.", offset), 3191 "'$name' isn't an instance field of this class.", offset),
3192 offset); 3192 offset);
3193 } 3193 }
3194 } 3194 }
(...skipping 605 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