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

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

Issue 2930093002: Complain about external methods with a body. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 08211e9a64dbe5fbddaebff2da66286607f3ff04..109b0c7fe922e5f0b49c9ab8647398aca7f7a4a1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -484,7 +484,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
initializer = buildInvalidInitializer(node, token.charOffset);
}
_typeInferrer.inferInitializer(initializer);
- if (member is KernelConstructorBuilder) {
+ if (member is KernelConstructorBuilder && !member.isExternal) {
member.addInitializer(initializer);
} else {
addCompileTimeError(

Powered by Google App Engine
This is Rietveld 408576698