| Index: packages/initialize/lib/transformer.dart
|
| diff --git a/packages/initialize/lib/transformer.dart b/packages/initialize/lib/transformer.dart
|
| index 34acd4ace11f7dd9b564c7ea7b7e835ab054df31..06ae76e3e8d2758e7f96a2af0a82e4d48535b82f 100644
|
| --- a/packages/initialize/lib/transformer.dart
|
| +++ b/packages/initialize/lib/transformer.dart
|
| @@ -129,8 +129,7 @@ class InitializeTransformer extends Transformer {
|
| // [entryPoint].
|
| void _replaceEntryWithBootstrap(Transform transform, dom.Document document,
|
| AssetId entryPoint, AssetId originalDartFile, AssetId newDartFile) {
|
| - var scripts = _getScripts(document)
|
| - .where((script) {
|
| + var scripts = _getScripts(document).where((script) {
|
| var assetId = uriToAssetId(entryPoint, _getScriptAttribute(script),
|
| transform.logger, script.sourceSpan);
|
| return assetId == originalDartFile;
|
| @@ -258,6 +257,7 @@ class _BootstrapFileBuilder {
|
| '(possibly transitive).');
|
| }
|
| }
|
| +
|
| readSuperClassAnnotations(clazz.supertype);
|
| _readAnnotations(clazz);
|
| }
|
| @@ -271,9 +271,9 @@ class _BootstrapFileBuilder {
|
| var metaNodes;
|
| var node = element.computeNode();
|
| if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
|
| - metaNodes = node.parent.parent.metadata;
|
| + metaNodes = (node.parent.parent as AnnotatedNode).metadata;
|
| } else if (node is ClassDeclaration || node is FunctionDeclaration) {
|
| - metaNodes = node.metadata;
|
| + metaNodes = (node as AnnotatedNode).metadata;
|
| } else {
|
| return found;
|
| }
|
| @@ -283,7 +283,10 @@ class _BootstrapFileBuilder {
|
| var meta = metaNode.elementAnnotation;
|
| var e = meta.element;
|
| if (e is PropertyAccessorElement) {
|
| - return _isInitializer(e.variable.evaluationResult.value.type);
|
| + // 'as dynamic' is because evaluationResult is a property on an impl class, e.g. one that
|
| + // isn't supposed to be used externally.
|
| + return _isInitializer(
|
| + (e.variable as dynamic).evaluationResult.value.type);
|
| } else if (e is ConstructorElement) {
|
| return _isInitializer(e.returnType);
|
| }
|
|
|