Skip to content

Commit 51f6fd3

Browse files
authored
Allow element.library to be null for dynamic (#1789)
1 parent 39fad72 commit 51f6fd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/model.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,8 @@ abstract class ModelElement extends Canonicalization
27652765
assert(library != null ||
27662766
e is ParameterElement ||
27672767
e is TypeParameterElement ||
2768-
e is GenericFunctionTypeElementImpl);
2768+
e is GenericFunctionTypeElementImpl ||
2769+
e.kind == ElementKind.DYNAMIC);
27692770
// With AnalysisDriver, we sometimes get ElementHandles when building
27702771
// docs for the SDK, seen via [Library.importedExportedLibraries]. Why?
27712772
if (e is ElementHandle) {

0 commit comments

Comments
 (0)