Skip to content

Commit

Permalink
Converter: Support missing genericBuilder
Browse files Browse the repository at this point in the history
Required by the wrapping converters,
but was swallowed previously due to the inconsistent error-ignoring logic.
  • Loading branch information
gdude2002 committed Dec 26, 2023
1 parent 0fac60b commit 0ca811c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public abstract class Converter<InputType : Any?, OutputType : Any?, NamedInputT

/** For delegation, retrieve the parsed value if it's been set, or null if it hasn't. **/
public operator fun getValue(thisRef: Arguments, property: KProperty<*>): OutputType =
if (genericBuilder.mutator != null) {
if (::genericBuilder.isInitialized && genericBuilder.mutator != null) {
genericBuilder.mutator!!(parsed)
} else {
parsed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class ArgumentTestExtension : Extension() {

action {
respond {
content = "Tag provided: `${arguments.tag?.name}`"
content = "Channel provided: `${arguments.channel?.mention}`\n" +
"Tag provided: `${arguments.tag?.name}`"
}
}
}
Expand Down

0 comments on commit 0ca811c

Please sign in to comment.