Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index fad4298d35af97a8d80cc6d5b4c10ba27292c562..07a9f0facb48071e53c628c1930f6d4c6a817356 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -725,6 +725,9 @@ abstract class Compiler implements DiagnosticListener { |
/// Incremental compilation is basically calling [run] more than once. |
final bool hasIncrementalSupport; |
+ /// If `true` native extension syntax is supported by the frontend. |
+ final bool allowNativeExtensions; |
+ |
api.CompilerOutputProvider outputProvider; |
bool disableInlining = false; |
@@ -965,6 +968,7 @@ abstract class Compiler implements DiagnosticListener { |
this.suppressWarnings: false, |
bool hasIncrementalSupport: false, |
this.enableAsyncAwait: false, |
+ this.allowNativeExtensions: false, |
api.CompilerOutputProvider outputProvider, |
List<String> strips: const []}) |
: this.disableTypeInferenceFlag = |
@@ -1901,6 +1905,7 @@ abstract class Compiler implements DiagnosticListener { |
void reportUnusedCode() { |
void checkLive(member) { |
+ if (member.isErroneous) return; |
if (member.isFunction) { |
if (!enqueuer.resolution.hasBeenResolved(member)) { |
reportHint(member, MessageKind.UNUSED_METHOD, |