File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,9 @@ class ObjectProjection {
54
54
55
55
const Projection &getProjection () const { return proj; }
56
56
57
- const ProjectionPath getProjectionPath () const {
57
+ const Optional< ProjectionPath> getProjectionPath () const {
58
58
return ProjectionPath::getProjectionPath (stripBorrow (REA->getOperand ()),
59
- REA)
60
- .getValue ();
59
+ REA);
61
60
}
62
61
63
62
bool operator ==(const ObjectProjection &other) const {
@@ -284,7 +283,11 @@ class AccessedStorage {
284
283
}
285
284
auto projPath = getObjectProjection ().getProjectionPath ();
286
285
auto otherProjPath = other.getObjectProjection ().getProjectionPath ();
287
- return projPath.hasNonEmptySymmetricDifference (otherProjPath);
286
+ if (!projPath.hasValue () || !otherProjPath.hasValue ()) {
287
+ return false ;
288
+ }
289
+ return projPath.getValue ().hasNonEmptySymmetricDifference (
290
+ otherProjPath.getValue ());
288
291
}
289
292
290
293
// / Returns the ValueDecl for the underlying storage, if it can be
You can’t perform that action at this time.
0 commit comments