Skip to content

Commit

Permalink
remove assert and use a problem node instead
Browse files Browse the repository at this point in the history
  • Loading branch information
maximiliankaul authored and oxisto committed Nov 15, 2024
1 parent ab6d99f commit 48f6e0c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,12 @@ class ExpressionHandler(lang: CXXLanguageFrontend) :
when {
reference is MemberExpression -> {
val baseType = reference.base.type.root
assert(baseType !is SecondOrderType)
if (baseType is SecondOrderType) {
return newProblemExpression(
problem = "Expected something other than a `SecondOrderType` as base.",
rawNode = ctx
)
}
callExpression = newMemberCallExpression(reference, rawNode = ctx)
if (
(ctx.functionNameExpression as? IASTFieldReference)?.fieldName
Expand Down

0 comments on commit 48f6e0c

Please sign in to comment.