Skip to content

Commit 7d87348

Browse files
committed
Workaround for missing imports
1 parent e17e724 commit 7d87348

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/model/getter_setter_combo.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ mixin GetterSetterCombo on ModelElement {
5252
.toString();
5353
Element staticElement =
5454
(constantInitializer as InstanceCreationExpression).staticElement;
55-
if (staticElement == null)
56-
return original;
55+
assert(staticElement != null,
56+
'${original} should be able to be resolved but an analysis error prevents this');
57+
if (staticElement == null) return original;
5758
Constructor target = ModelElement.fromElement(staticElement, packageGraph);
5859
Class targetClass = target.enclosingElement;
5960
// TODO(jcollins-g): this logic really should be integrated into Constructor,

0 commit comments

Comments
 (0)