Version 2.12.0-153.0.dev

Merge commit 'f94c7a10ef33e670eefb9206764f95b8a082db5e' into 'dev'
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
index 512f787..5d17ae8 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/generic_inferrer.dart'
     show GenericInferrer;
 import 'package:analyzer/src/dart/element/type_algebra.dart';
@@ -45,8 +44,7 @@
         if (extension != null) {
           var extendedType = extension.extendedType.type;
           if (extendedType is InterfaceType) {
-            var types = <InterfaceType>[];
-            ClassElementImpl.collectAllSupertypes(types, extendedType, null);
+            var types = [extendedType, ...extendedType.allSupertypes];
             for (var type in types) {
               var inheritanceDistance = memberBuilder.request.featureComputer
                   .inheritanceDistanceFeature(
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index db1046a..e129445 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1100,36 +1100,6 @@
     return false;
   }
 
-  static void collectAllSupertypes(List<InterfaceType> supertypes,
-      InterfaceType startingType, InterfaceType excludeType) {
-    List<InterfaceType> typesToVisit = <InterfaceType>[];
-    List<ClassElement> visitedClasses = <ClassElement>[];
-    typesToVisit.add(startingType);
-    while (typesToVisit.isNotEmpty) {
-      InterfaceType currentType = typesToVisit.removeAt(0);
-      ClassElement currentElement = currentType.element;
-      if (!visitedClasses.contains(currentElement)) {
-        visitedClasses.add(currentElement);
-        if (!identical(currentType, excludeType)) {
-          supertypes.add(currentType);
-        }
-        InterfaceType supertype = currentType.superclass;
-        if (supertype != null) {
-          typesToVisit.add(supertype);
-        }
-        for (InterfaceType type in currentType.superclassConstraints) {
-          typesToVisit.add(type);
-        }
-        for (InterfaceType type in currentType.interfaces) {
-          typesToVisit.add(type);
-        }
-        for (InterfaceType type in currentType.mixins) {
-          typesToVisit.add(type);
-        }
-      }
-    }
-  }
-
   static ConstructorElement getNamedConstructorFromList(
       String name, List<ConstructorElement> constructors) {
     for (ConstructorElement element in constructors) {
diff --git a/pkg/analyzer/lib/src/test_utilities/find_element.dart b/pkg/analyzer/lib/src/test_utilities/find_element.dart
index 7e76747..03153c0 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_element.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_element.dart
@@ -405,15 +405,6 @@
     throw StateError('Not found: $name');
   }
 
-  FunctionTypeAliasElement functionTypeAlias(String name) {
-    for (var element in unitElement.functionTypeAliases) {
-      if (element.name == name) {
-        return element;
-      }
-    }
-    throw StateError('Not found: $name');
-  }
-
   PropertyAccessorElement getter(String name, {String of}) {
     PropertyAccessorElement result;
 
diff --git a/pkg/analyzer/test/generated/invalid_code_test.dart b/pkg/analyzer/test/generated/invalid_code_test.dart
index 95d6713..f459e36 100644
--- a/pkg/analyzer/test/generated/invalid_code_test.dart
+++ b/pkg/analyzer/test/generated/invalid_code_test.dart
@@ -120,7 +120,7 @@
     await _assertCanBeAnalyzed(r'''
 typedef F = void Function(bool, int a(double b));
 ''');
-    var alias = findElement.functionTypeAlias('F');
+    var alias = findElement.typeAlias('F');
     assertType(
         alias.instantiate(
           typeArguments: const [],
@@ -189,7 +189,7 @@
     await _assertCanBeAnalyzed(r'''
 typedef void F(int a, this.b);
 ''');
-    var alias = findElement.functionTypeAlias('F');
+    var alias = findElement.typeAlias('F');
     assertType(
         alias.instantiate(
           typeArguments: const [],
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index c26ac85..d1a5b58 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -954,7 +954,7 @@
     verifyTestResolved();
 
     expect(
-      findElement.functionTypeAlias('F').metadata,
+      findElement.typeAlias('F').metadata,
       hasLength(1),
     );
 
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index eacf5d6..21fcfc4 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -17,6 +17,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(IndexTest);
+    defineReflectiveTests(IndexWithNonFunctionTypeAliasesTest);
   });
 }
 
@@ -34,26 +35,7 @@
 }
 
 @reflectiveTest
-class IndexTest extends PubPackageResolutionTest {
-  AnalysisDriverUnitIndex index;
-
-  _ElementIndexAssert assertThat(Element element) {
-    List<_Relation> relations = _getElementRelations(element);
-    return _ElementIndexAssert(this, element, relations);
-  }
-
-  _NameIndexAssert assertThatName(String name) {
-    return _NameIndexAssert(this, name);
-  }
-
-  /// Return [ImportFindElement] for 'package:test/lib.dart' import.
-  ImportFindElement importFindLib() {
-    return findElement.importFind(
-      'package:test/lib.dart',
-      mustBeUnique: false,
-    );
-  }
-
+class IndexTest extends PubPackageResolutionTest with _IndexMixin {
   test_fieldFormalParameter_noSuchField() async {
     await _indexTestUnit('''
 class B<T> {
@@ -1407,6 +1389,166 @@
       ..isUsed('x += 2;', IndexRelationKind.IS_READ_WRITTEN_BY)
       ..isUsed('x();', IndexRelationKind.IS_INVOKED_BY);
   }
+}
+
+@reflectiveTest
+class IndexWithNonFunctionTypeAliasesTest extends PubPackageResolutionTest
+    with WithNonFunctionTypeAliasesMixin, _IndexMixin {
+  test_isExtendedBy_ClassDeclaration_TypeAliasElement() async {
+    await _indexTestUnit('''
+class A<T> {}
+typedef B = A<int>;
+class C extends B {}
+''');
+    var B = findElement.typeAlias('B');
+    assertThat(B)
+      ..isExtendedAt('B {}', false)
+      ..isReferencedAt('B {}', false);
+  }
+
+  test_isImplementedBy_ClassDeclaration_TypeAliasElement() async {
+    await _indexTestUnit('''
+class A<T> {}
+typedef B = A<int>;
+class C implements B {}
+''');
+    var B = findElement.typeAlias('B');
+    assertThat(B)
+      ..isImplementedAt('B {}', false)
+      ..isReferencedAt('B {}', false);
+  }
+
+  test_isMixedBy_ClassDeclaration_TypeAliasElement() async {
+    await _indexTestUnit('''
+class A<T> {}
+typedef B = A<int>;
+class C extends Object with B {}
+''');
+    var B = findElement.typeAlias('B');
+    assertThat(B)
+      ..isMixedInAt('B {}', false)
+      ..isReferencedAt('B {}', false);
+  }
+
+  test_isReferencedBy_ClassElement_inTypeAlias() async {
+    await _indexTestUnit('''
+class A<T> {}
+
+typedef B = A<int>;
+''');
+    assertThat(findElement.class_('A')).isReferencedAt('A<int', false);
+    assertThat(intElement).isReferencedAt('int>;', false);
+  }
+
+  test_isReferencedBy_TypeAliasElement() async {
+    await _indexTestUnit('''
+class A<T> {
+  static int field = 0;
+  static void method() {}
+}
+
+typedef B = A<int>;
+
+void f(B p) {
+  B v;
+  B(); // 2
+  B.field = 1;
+  B.field; // 3
+  B.method(); // 4
+}
+''');
+    var element = findElement.typeAlias('B');
+    assertThat(element)
+      ..isReferencedAt('B p) {', false)
+      ..isReferencedAt('B v;', false)
+      ..isReferencedAt('B(); // 2', false)
+      ..isReferencedAt('B.field = 1;', false)
+      ..isReferencedAt('B.field; // 3', false)
+      ..isReferencedAt('B.method(); // 4', false);
+  }
+}
+
+class _ElementIndexAssert {
+  final _IndexMixin test;
+  final Element element;
+  final List<_Relation> relations;
+
+  _ElementIndexAssert(this.test, this.element, this.relations);
+
+  void hasRelationCount(int expectedCount) {
+    expect(relations, hasLength(expectedCount));
+  }
+
+  void isAncestorOf(String search, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_ANCESTOR_OF,
+        test._expectedLocation(search, false, length: length));
+  }
+
+  void isExtendedAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_EXTENDED_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isImplementedAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_IMPLEMENTED_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isInvokedAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(element, relations, IndexRelationKind.IS_INVOKED_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isMixedInAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_MIXED_IN_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isReferencedAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_REFERENCED_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isWrittenAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(element, relations, IndexRelationKind.IS_WRITTEN_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+}
+
+mixin _IndexMixin on PubPackageResolutionTest {
+  AnalysisDriverUnitIndex index;
+
+  _ElementIndexAssert assertThat(Element element) {
+    List<_Relation> relations = _getElementRelations(element);
+    return _ElementIndexAssert(this, element, relations);
+  }
+
+  _NameIndexAssert assertThatName(String name) {
+    return _NameIndexAssert(this, name);
+  }
+
+  /// Return [ImportFindElement] for 'package:test/lib.dart' import.
+  ImportFindElement importFindLib() {
+    return findElement.importFind(
+      'package:test/lib.dart',
+      mustBeUnique: false,
+    );
+  }
 
   /// Asserts that [index] has an item with the expected properties.
   void _assertHasRelation(
@@ -1558,68 +1700,6 @@
   }
 }
 
-class _ElementIndexAssert {
-  final IndexTest test;
-  final Element element;
-  final List<_Relation> relations;
-
-  _ElementIndexAssert(this.test, this.element, this.relations);
-
-  void hasRelationCount(int expectedCount) {
-    expect(relations, hasLength(expectedCount));
-  }
-
-  void isAncestorOf(String search, {int length}) {
-    test._assertHasRelation(
-        element,
-        relations,
-        IndexRelationKind.IS_ANCESTOR_OF,
-        test._expectedLocation(search, false, length: length));
-  }
-
-  void isExtendedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(
-        element,
-        relations,
-        IndexRelationKind.IS_EXTENDED_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-
-  void isImplementedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(
-        element,
-        relations,
-        IndexRelationKind.IS_IMPLEMENTED_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-
-  void isInvokedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, relations, IndexRelationKind.IS_INVOKED_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-
-  void isMixedInAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(
-        element,
-        relations,
-        IndexRelationKind.IS_MIXED_IN_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-
-  void isReferencedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(
-        element,
-        relations,
-        IndexRelationKind.IS_REFERENCED_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-
-  void isWrittenAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, relations, IndexRelationKind.IS_WRITTEN_BY,
-        test._expectedLocation(search, isQualified, length: length));
-  }
-}
-
 class _NameIndexAssert {
   final IndexTest test;
   final String name;
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 98b60a3..1aa797b 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -1756,7 +1756,7 @@
     var a = findElement.class_('A');
     var b = findElement.class_('B');
     var c = findElement.mixin('C');
-    var d = findElement.functionTypeAlias('D');
+    var d = findElement.typeAlias('D');
     var f = findElement.function('f');
     var g = findElement.topVar('g');
     RegExp regExp = RegExp(r'^[ABCDfg]$');
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index da6c9ff..64b9586 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -131,7 +131,7 @@
 
     // The element and type arguments are available for the function type.
     var importFind = findElement.importFind('package:test/a.dart');
-    var alias = importFind.functionTypeAlias('F');
+    var alias = importFind.typeAlias('F');
     var aliasedElement = alias.aliasedElement as GenericFunctionTypeElement;
     expect(typeArgument.element, aliasedElement);
     expect(typeArgument.element.enclosingElement, alias);
diff --git a/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
index 5a169e7..3f82b02 100644
--- a/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
@@ -26,7 +26,7 @@
     FunctionType type = findElement.topVar('g').type;
     assertType(type, 'int Function()');
 
-    var typedefG = findElement.functionTypeAlias('G');
+    var typedefG = findElement.typeAlias('G');
     var functionG = typedefG.aliasedElement as GenericFunctionTypeElement;
 
     expect(type.element, functionG);
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 3762cb3..a327c4e 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -152,7 +152,7 @@
     var type = findElement.topVar('g').type as FunctionType;
     assertType(type, 'int Function(double)');
 
-    var typedefG = findElement.functionTypeAlias('G');
+    var typedefG = findElement.typeAlias('G');
     var functionG = typedefG.aliasedElement as GenericFunctionTypeElement;
 
     expect(type.element, functionG);
@@ -169,7 +169,7 @@
 
 typedef F<T extends A> = B Function<U extends B>(T a, U b);
 ''');
-    var f = findElement.functionTypeAlias('F');
+    var f = findElement.typeAlias('F');
     expect(f.typeParameters, hasLength(1));
 
     var t = f.typeParameters[0];
diff --git a/pkg/analyzer/test/src/dart/resolution/type_name_test.dart b/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
index 146b2a1..f802202 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
@@ -143,7 +143,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      findElement.functionTypeAlias('F'),
+      findElement.typeAlias('F'),
       typeStr('int Function()', 'int* Function()*'),
     );
   }
@@ -157,7 +157,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      findElement.functionTypeAlias('F'),
+      findElement.typeAlias('F'),
       typeStr('num Function()', 'num* Function()*'),
     );
   }
@@ -171,7 +171,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      findElement.functionTypeAlias('F'),
+      findElement.typeAlias('F'),
       typeStr('dynamic Function()', 'dynamic Function()*'),
     );
   }
@@ -185,7 +185,7 @@
 
     assertTypeName(
       findNode.typeName('F<int> a'),
-      findElement.functionTypeAlias('F'),
+      findElement.typeAlias('F'),
       typeStr('int Function()', 'int* Function()*'),
     );
   }
@@ -544,7 +544,7 @@
 f(F a) {}
 ''');
 
-    var element = import_a.functionTypeAlias('F');
+    var element = import_a.typeAlias('F');
 
     var typeName = findNode.typeName('F a');
     assertTypeName(typeName, element, 'int* Function(bool*)*');
@@ -568,7 +568,7 @@
 f(F a) {}
 ''');
 
-    var element = import_a.functionTypeAlias('F');
+    var element = import_a.typeAlias('F');
 
     var typeName = findNode.typeName('F a');
     assertTypeName(typeName, element, 'dynamic Function(bool*)*');
@@ -592,7 +592,7 @@
 f(F a) {}
 ''');
 
-    var element = import_a.functionTypeAlias('F');
+    var element = import_a.typeAlias('F');
 
     var typeName = findNode.typeName('F a');
     assertTypeName(typeName, element, 'num* Function(bool*)*');
@@ -616,7 +616,7 @@
 f(F<int> a) {}
 ''');
 
-    var element = import_a.functionTypeAlias('F');
+    var element = import_a.typeAlias('F');
 
     var typeName = findNode.typeName('F<int> a');
     assertTypeName(typeName, element, 'int* Function(bool*)*');
@@ -728,7 +728,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      import_a.functionTypeAlias('F'),
+      import_a.typeAlias('F'),
       'int* Function()',
     );
   }
@@ -749,7 +749,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      import_a.functionTypeAlias('F'),
+      import_a.typeAlias('F'),
       'num* Function()',
     );
   }
@@ -770,7 +770,7 @@
 
     assertTypeName(
       findNode.typeName('F a'),
-      import_a.functionTypeAlias('F'),
+      import_a.typeAlias('F'),
       'dynamic Function()',
     );
   }
@@ -791,7 +791,7 @@
 
     assertTypeName(
       findNode.typeName('F<int> a'),
-      import_a.functionTypeAlias('F'),
+      import_a.typeAlias('F'),
       'int* Function()',
     );
   }
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 54420e8..3ec6fc8 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -216,6 +216,7 @@
             -1,
             library.importUri);
       } else if (uri.scheme == SourceLibraryBuilder.MALFORMED_URI_SCHEME) {
+        library.addProblemAtAccessors(messageExpectedUri);
         bytes = synthesizeSourceForMissingFile(library.importUri, null);
       }
       if (bytes != null) {
diff --git a/pkg/front_end/test/incremental_load_from_dill_suite.dart b/pkg/front_end/test/incremental_load_from_dill_suite.dart
index 3a00d7e..3c88456 100644
--- a/pkg/front_end/test/incremental_load_from_dill_suite.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_suite.dart
@@ -1825,9 +1825,14 @@
         invalidatedUris.map((uri) => uri.pathSegments.last).toSet();
     Set<Uri> result = new Set<Uri>();
     for (Uri uri in invalidatedImportUrisForTesting) {
-      if (uri.pathSegments.last == "nonexisting.dart") continue;
+      if (uri.pathSegments.isNotEmpty &&
+          uri.pathSegments.last == "nonexisting.dart") {
+        continue;
+      }
       if (invalidatedFilenames.contains(entryPoint.pathSegments.last) ||
-          invalidatedFilenames.contains(uri.pathSegments.last)) result.add(uri);
+          invalidatedFilenames.contains(uri.pathSegments.last)) {
+        result.add(uri);
+      }
     }
 
     return result.isEmpty ? null : result;
diff --git a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.outline.expect b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.outline.expect
index a493720..3b1e61e 100644
--- a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.outline.expect
+++ b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.outline.expect
@@ -47,18 +47,46 @@
 }
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:8:8: Error: Expected a URI.
+// import ':c';
+//        ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:9:1: Error: Expected a URI.
+// export ':d';
+// ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:5:8: Error: Expected a URI.
+// import ':a';
+//        ^
+//
 import self as self5;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:6:1: Error: Expected a URI.
+// export ':b';
+// ^
+//
 import self as self6;
 
 
diff --git a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.expect b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.expect
index 02eadb5..2ff6f4b 100644
--- a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.expect
+++ b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.expect
@@ -50,18 +50,46 @@
 }
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:8:8: Error: Expected a URI.
+// import ':c';
+//        ^
+//
 import self as self2;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:9:1: Error: Expected a URI.
+// export ':d';
+// ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:5:8: Error: Expected a URI.
+// import ':a';
+//        ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:6:1: Error: Expected a URI.
+// export ':b';
+// ^
+//
 import self as self5;
 
 
diff --git a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.transformed.expect
index 02eadb5..2ff6f4b 100644
--- a/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/platform_invalid_uris/main.dart.strong.transformed.expect
@@ -50,18 +50,46 @@
 }
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:8:8: Error: Expected a URI.
+// import ':c';
+//        ^
+//
 import self as self2;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/patch_lib.dart:9:1: Error: Expected a URI.
+// export ':d';
+// ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:5:8: Error: Expected a URI.
+// import ':a';
+//        ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/platform_invalid_uris/origin_lib.dart:6:1: Error: Expected a URI.
+// export ':b';
+// ^
+//
 import self as self5;
 
 
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml
index 3cf6bc9..2620942c 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml
@@ -11,11 +11,12 @@
       main.dart: |
         // The space makes the scheme invalid -- this causes Uri.parse to throw.
         part ' package:foo/bar.dart';
-    expectedLibraryCount: 2
+    expectedLibraryCount: 1
     errors: true
   - entry: main.dart
     errors: false
     worldType: updated
+    checkInvalidatedFiles: false
     invalidate:
       - main.dart
     sources:
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml.world.1.expect
index 38a3f82..8763205 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_part_uri_01.yaml.world.1.expect
@@ -1,5 +1,12 @@
 main = <No Member>;
 library from "org-dartlang-malformed-uri:?+package%3Afoo%2Fbar.dart" as ?+p {
+//
+// Problems in library:
+//
+// org-dartlang-test:///main.dart:2:6: Error: Expected a URI.
+// part ' package:foo/bar.dart';
+//      ^
+//
 
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml
new file mode 100644
index 0000000..a77a588
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml
@@ -0,0 +1,22 @@
+# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    errors: true
+    sources:
+      main.dart: |
+        part '$foo';
+        main() {}
+    expectedLibraryCount: 1
+
+  - entry: main.dart
+    errors: true
+    worldType: updated
+    checkInvalidatedFiles: false
+    expectInitializeFromDill: false
+    invalidate:
+      - main.dart
+    expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.1.expect
new file mode 100644
index 0000000..144eef3
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.1.expect
@@ -0,0 +1,23 @@
+main = main::main;
+library from "org-dartlang-malformed-uri:bad5" as bad5 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///main.dart:1:6: Error: Expected a URI.
+// part '$foo';
+//      ^
+//
+
+}
+library from "org-dartlang-test:///main.dart" as main {
+//
+// Problems in library:
+//
+// org-dartlang-test:///main.dart:1:7: Error: Can't use string interpolation in a URI.
+// part '$foo';
+//       ^
+//
+
+  part org-dartlang-malformed-uri:bad5;
+  static method main() → dynamic {}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.2.expect
new file mode 100644
index 0000000..144eef3
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/invalid_uri_as_part.yaml.world.2.expect
@@ -0,0 +1,23 @@
+main = main::main;
+library from "org-dartlang-malformed-uri:bad5" as bad5 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///main.dart:1:6: Error: Expected a URI.
+// part '$foo';
+//      ^
+//
+
+}
+library from "org-dartlang-test:///main.dart" as main {
+//
+// Problems in library:
+//
+// org-dartlang-test:///main.dart:1:7: Error: Can't use string interpolation in a URI.
+// part '$foo';
+//       ^
+//
+
+  part org-dartlang-malformed-uri:bad5;
+  static method main() → dynamic {}
+}
diff --git a/pkg/front_end/testcases/regress/issue_29977.dart.outline.expect b/pkg/front_end/testcases/regress/issue_29977.dart.outline.expect
index 7c9a95c..f162b6e 100644
--- a/pkg/front_end/testcases/regress/issue_29977.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_29977.dart.outline.expect
@@ -15,4 +15,11 @@
   ;
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29977.dart:5:8: Error: Expected a URI.
+// import 'data:async';
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_29977.dart.strong.expect b/pkg/front_end/testcases/regress/issue_29977.dart.strong.expect
index b940300..2709154 100644
--- a/pkg/front_end/testcases/regress/issue_29977.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_29977.dart.strong.expect
@@ -14,4 +14,11 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29977.dart:5:8: Error: Expected a URI.
+// import 'data:async';
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_29977.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_29977.dart.strong.transformed.expect
index b940300..2709154 100644
--- a/pkg/front_end/testcases/regress/issue_29977.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29977.dart.strong.transformed.expect
@@ -14,4 +14,11 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29977.dart:5:8: Error: Expected a URI.
+// import 'data:async';
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_29987.dart.outline.expect b/pkg/front_end/testcases/regress/issue_29987.dart.outline.expect
index 31663c2..25fefc3 100644
--- a/pkg/front_end/testcases/regress/issue_29987.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_29987.dart.outline.expect
@@ -15,4 +15,11 @@
   ;
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29987.dart:5:8: Error: Expected a URI.
+// import "dart_:core";
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_29987.dart.strong.expect b/pkg/front_end/testcases/regress/issue_29987.dart.strong.expect
index 1a60106..4430e45 100644
--- a/pkg/front_end/testcases/regress/issue_29987.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_29987.dart.strong.expect
@@ -14,4 +14,11 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29987.dart:5:8: Error: Expected a URI.
+// import "dart_:core";
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_29987.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_29987.dart.strong.transformed.expect
index 1a60106..4430e45 100644
--- a/pkg/front_end/testcases/regress/issue_29987.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29987.dart.strong.transformed.expect
@@ -14,4 +14,11 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_29987.dart:5:8: Error: Expected a URI.
+// import "dart_:core";
+//        ^
+//
 import self as self2;
diff --git a/pkg/front_end/testcases/regress/issue_30994.dart.outline.expect b/pkg/front_end/testcases/regress/issue_30994.dart.outline.expect
index 468c487..248fabb 100644
--- a/pkg/front_end/testcases/regress/issue_30994.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_30994.dart.outline.expect
@@ -43,28 +43,77 @@
   ;
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:6:6: Error: Expected a URI.
+// part '$foo';
+//      ^
+//
 import self as self2;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:7:6: Error: Expected a URI.
+// part '$foo/bar';
+//      ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:8:6: Error: Expected a URI.
+// part '$for/bar';
+//      ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:9:6: Error: Expected a URI.
+// part '${true}';
+//      ^
+//
 import self as self5;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:10:6: Error: Expected a URI.
+// part 'the${1}thing';
+//      ^
+//
 import self as self6;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:11:6: Error: Expected a URI.
+// part 'part_$foo${'a'}.dart';
+//      ^
+//
 import self as self7;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:12:6: Error: Expected a URI.
+// part 'part_${'a'}_$foo.dart';
+//      ^
+//
 import self as self8;
diff --git a/pkg/front_end/testcases/regress/issue_30994.dart.strong.expect b/pkg/front_end/testcases/regress/issue_30994.dart.strong.expect
index 99b330c..212f13d 100644
--- a/pkg/front_end/testcases/regress/issue_30994.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_30994.dart.strong.expect
@@ -42,28 +42,77 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:6:6: Error: Expected a URI.
+// part '$foo';
+//      ^
+//
 import self as self2;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:7:6: Error: Expected a URI.
+// part '$foo/bar';
+//      ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:8:6: Error: Expected a URI.
+// part '$for/bar';
+//      ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:9:6: Error: Expected a URI.
+// part '${true}';
+//      ^
+//
 import self as self5;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:10:6: Error: Expected a URI.
+// part 'the${1}thing';
+//      ^
+//
 import self as self6;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:11:6: Error: Expected a URI.
+// part 'part_$foo${'a'}.dart';
+//      ^
+//
 import self as self7;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:12:6: Error: Expected a URI.
+// part 'part_${'a'}_$foo.dart';
+//      ^
+//
 import self as self8;
diff --git a/pkg/front_end/testcases/regress/issue_30994.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_30994.dart.strong.transformed.expect
index 99b330c..212f13d 100644
--- a/pkg/front_end/testcases/regress/issue_30994.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_30994.dart.strong.transformed.expect
@@ -42,28 +42,77 @@
 static method main() → dynamic {}
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:6:6: Error: Expected a URI.
+// part '$foo';
+//      ^
+//
 import self as self2;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:7:6: Error: Expected a URI.
+// part '$foo/bar';
+//      ^
+//
 import self as self3;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:8:6: Error: Expected a URI.
+// part '$for/bar';
+//      ^
+//
 import self as self4;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:9:6: Error: Expected a URI.
+// part '${true}';
+//      ^
+//
 import self as self5;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:10:6: Error: Expected a URI.
+// part 'the${1}thing';
+//      ^
+//
 import self as self6;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:11:6: Error: Expected a URI.
+// part 'part_$foo${'a'}.dart';
+//      ^
+//
 import self as self7;
 
 
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_30994.dart:12:6: Error: Expected a URI.
+// part 'part_${'a'}_$foo.dart';
+//      ^
+//
 import self as self8;
diff --git a/pkg/nnbd_migration/test/node_builder_test.dart b/pkg/nnbd_migration/test/node_builder_test.dart
index 346e69d..870e29a 100644
--- a/pkg/nnbd_migration/test/node_builder_test.dart
+++ b/pkg/nnbd_migration/test/node_builder_test.dart
@@ -1053,7 +1053,7 @@
     await analyze('''
 typedef T F<T, U>(U u);
 ''');
-    var element = findElement.functionTypeAlias('F');
+    var element = findElement.typeAlias('F');
     var decoratedType = variables.decoratedElementType(element.aliasedElement);
     var t = element.typeParameters[0];
     var u = element.typeParameters[1];
@@ -1078,8 +1078,8 @@
     await analyze('''
 typedef F();
 ''');
-    var decoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var decoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     expect(decoratedType.returnType.type.isDynamic, isTrue);
     expect(decoratedType.returnType.node.isImmutable, false);
     expect(decoratedType.typeFormals, isEmpty);
@@ -1089,8 +1089,8 @@
     await analyze('''
 typedef int F(String s);
 ''');
-    var decoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var decoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     expect(decoratedType.returnType, same(decoratedTypeAnnotation('int')));
     expect(decoratedType.typeFormals, isEmpty);
     expect(decoratedType.positionalParameters[0],
@@ -1287,7 +1287,7 @@
     await analyze('''
 typedef F = T Function<T, U>(U u);
 ''');
-    var element = findElement.functionTypeAlias('F');
+    var element = findElement.typeAlias('F');
     var decoratedType = variables.decoratedElementType(element.aliasedElement);
     expect(decoratedType,
         same(decoratedGenericFunctionTypeAnnotation('T Function')));
@@ -1311,7 +1311,7 @@
     await analyze('''
 typedef F<T, U> = T Function(U u);
 ''');
-    var element = findElement.functionTypeAlias('F');
+    var element = findElement.typeAlias('F');
     var decoratedType = variables.decoratedElementType(element.aliasedElement);
     expect(decoratedType,
         same(decoratedGenericFunctionTypeAnnotation('T Function')));
@@ -1338,8 +1338,8 @@
     await analyze('''
 typedef F = Function();
 ''');
-    var decoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var decoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     expect(decoratedType,
         same(decoratedGenericFunctionTypeAnnotation('Function')));
     expect(decoratedType.returnType.type.isDynamic, isTrue);
@@ -1351,8 +1351,8 @@
     await analyze('''
 typedef F = int Function(String s);
 ''');
-    var decoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var decoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     expect(decoratedType,
         same(decoratedGenericFunctionTypeAnnotation('int Function')));
     expect(decoratedType.returnType, same(decoratedTypeAnnotation('int')));
@@ -2070,8 +2070,8 @@
     // from the ones in the typedef (they will be unified by the edge builder).
     // This is necessary because there is no guarantee of whether the typedef or
     // its usage will be visited first.
-    var typedefDecoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var typedefDecoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     var decoratedType = decoratedTypeAnnotation('F<int>');
     expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
     expect(decoratedType.node, isNot(same(typedefDecoratedType.node)));
@@ -2091,8 +2091,8 @@
     // from the ones in the typedef (they will be unified by the edge builder).
     // This is necessary because there is no guarantee of whether the typedef or
     // its usage will be visited first.
-    var typedefDecoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var typedefDecoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     var decoratedType = decoratedTypeAnnotation('F f');
     expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
     expect(decoratedType.node, isNot(same(typedefDecoratedType.node)));
@@ -2121,8 +2121,8 @@
     // from the ones in the typedef (they will be unified by the edge builder).
     // This is necessary because there is no guarantee of whether the typedef or
     // its usage will be visited first.
-    var typedefDecoratedType = variables.decoratedElementType(
-        findElement.functionTypeAlias('F').aliasedElement);
+    var typedefDecoratedType = variables
+        .decoratedElementType(findElement.typeAlias('F').aliasedElement);
     var decoratedType = decoratedTypeAnnotation('F f');
     expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
     expect(decoratedType.node, isNot(same(typedefDecoratedType.node)));
diff --git a/tools/VERSION b/tools/VERSION
index fad545f..d1e4aec 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 12
 PATCH 0
-PRERELEASE 152
+PRERELEASE 153
 PRERELEASE_PATCH 0
\ No newline at end of file