Skip to content

Commit

Permalink
Fix Exception when running with KSP2 (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi authored Jun 4, 2024
1 parent 5d7d80e commit a3590f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package com.kotlindiscord.kord.extensions.modules.annotations.converters

import com.google.devtools.ksp.symbol.KSAnnotation
import com.google.devtools.ksp.symbol.KSType
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.kotlindiscord.kord.extensions.modules.annotations.orNull

/**
Expand All @@ -31,8 +31,8 @@ public data class ConverterAnnotationArgs(public val annotation: KSAnnotation) {

/** @suppress **/
public val types: List<ConverterType> =
(argMap["types"]!! as ArrayList<KSType>).mapNotNull {
ConverterType.fromName(it.declaration.simpleName.asString())
(argMap["types"]!! as ArrayList<KSClassDeclaration>).mapNotNull {
ConverterType.fromName(it.simpleName.asString())
}

/** @suppress **/
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ksp.incremental=false
projectVersion=1.8.1-SNAPSHOT
#dokka will run out of memory with the default meta space
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m
ksp.useKSP2=true

0 comments on commit a3590f1

Please sign in to comment.