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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_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/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index bae5cd7448deeaaffbde362a8236cf1614a9991c..2fa72595d6119ac3dab4776311443f188d7eba4b 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -22,7 +22,7 @@ import '../errors.dart' show internalError;
import '../builder/builder.dart';
-import '../modifier.dart' show Modifier;
+import '../modifier.dart' show abstractMask, externalMask, Modifier;
import 'source_library_builder.dart' show SourceLibraryBuilder;
@@ -373,6 +373,9 @@ class OutlineBuilder extends UnhandledListener {
TypeBuilder returnType = pop();
int modifiers =
Modifier.validate(pop(), isAbstract: bodyKind == MethodBody.Abstract);
+ if ((modifiers & externalMask) != 0) {
+ modifiers &= ~abstractMask;
+ }
List<MetadataBuilder> metadata = pop();
library.addProcedure(
metadata,

Powered by Google App Engine
This is Rietveld 408576698