Skip to content

Commit d8a6642

Browse files
Merge pull request #6403 from adrian-prantl/unknown-self
Treat an unknown type for self as a fatal error in the expression eva…
2 parents c8f12b3 + 4b6f646 commit d8a6642

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftUserExpression.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,12 @@ static bool AddVariableInfo(
319319
}
320320

321321
// If the import failed, give up.
322-
if (!target_type.IsValid())
322+
if (!target_type.IsValid()) {
323+
// Treat an invalid type for self as a fatal error.
324+
if (is_self)
325+
return false;
323326
return true;
327+
}
324328

325329
// If we couldn't fully realize the type, then we aren't going
326330
// to get very far making a local out of it, so discard it here.

0 commit comments

Comments
 (0)