Skip to content

Commit e17e724

Browse files
committed
Allow staticElement to be null
1 parent db5fe1c commit e17e724

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/src/model/getter_setter_combo.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ mixin GetterSetterCombo on ModelElement {
5252
.toString();
5353
Element staticElement =
5454
(constantInitializer as InstanceCreationExpression).staticElement;
55+
if (staticElement == null)
56+
return original;
5557
Constructor target = ModelElement.fromElement(staticElement, packageGraph);
5658
Class targetClass = target.enclosingElement;
5759
// TODO(jcollins-g): this logic really should be integrated into Constructor,

0 commit comments

Comments
 (0)