Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
foresti-smeup committed Jan 18, 2024
1 parent 0b4dd84 commit f1f0705
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ class RpgProgram(val cu: CompilationUnit, val name: String = "<UNNAMED RPG PROGR
require(params.keys.toSet() == params().asSequence().map { it.name }.toSet()) {
"Expected params: ${params().asSequence().map { it.name }.joinToString(", ")}"
}
} else if (expectedKeys.size > params.size) {
} else {
require(params().asSequence().map { it.name }.toSet().all { it in expectedKeys }) {
"Expected params: ${params().asSequence().map { it.name }.joinToString(", ")}"
}

params().forEach() {
if (it.name in params.keys == false) {
params.put(it.name, VoidValue)
// Set not passed params to VoidValue
params().forEach {
if (it.name !in params.keys) {
params[it.name] = VoidValue
}
}
}
Expand Down

0 comments on commit f1f0705

Please sign in to comment.