Skip to content

Commit

Permalink
Fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Dec 30, 2023
1 parent c6128cd commit 7c2ef39
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ class DeclarationHandler(lang: CXXLanguageFrontend) :
for (candidate in declarationCandidates) {
candidate.definition = declaration
// Do some additional magic with default parameters, which I do not really understand
for (i in declaration.parameters.indices) {
if (candidate.parameters[i].default != null) {
declaration.parameters[i].default = candidate.parameters[i].default
for ((i, param) in candidate.parameters.withIndex()) {
if (param.default != null) {
declaration.parameters.getOrNull(i)?.default = candidate.parameters[i].default
}
}
}
Expand Down

0 comments on commit 7c2ef39

Please sign in to comment.