Index: pkg/front_end/lib/src/fasta/target_implementation.dart |
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart |
index 45a105f4ca7e466e2cbad8e196db6368a875a6c7..f23ca47e1e28312981c7916f1fda82886dc7c7c8 100644 |
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart |
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart |
@@ -20,6 +20,7 @@ import 'translate_uri.dart' show TranslateUri; |
abstract class TargetImplementation extends Target { |
final TranslateUri uriTranslator; |
Builder cachedCompileTimeError; |
+ Builder cachedAbstractClassInstantiationError; |
Builder cachedNativeAnnotation; |
TargetImplementation(Ticker ticker, this.uriTranslator) : super(ticker); |
@@ -50,6 +51,17 @@ abstract class TargetImplementation extends Target { |
loader.coreLibrary.getConstructor("_CompileTimeError", isPrivate: true); |
} |
+ /// Returns a reference to the constructor of |
+ /// [AbstractClassInstantiationError] error. The constructor is expected to |
+ /// accept a single argument of type String, which is the name of the |
+ /// abstract class. |
+ Builder getAbstractClassInstantiationError(Loader loader) { |
+ if (cachedAbstractClassInstantiationError != null) |
+ return cachedAbstractClassInstantiationError; |
karlklose
2017/03/28 05:19:34
Use {}
ahe
2017/03/29 07:41:01
Done.
|
+ return cachedAbstractClassInstantiationError = |
+ loader.coreLibrary.getConstructor("AbstractClassInstantiationError"); |
+ } |
+ |
/// Returns a reference to the constructor used for creating `native` |
/// annotations. The constructor is expected to accept a single argument of |
/// type String, which is the name of the native method. |