mirror of
https://github.com/apple/pkl.git
synced 2026-09-07 10:27:30 +02:00
Add this as a self type (#1708)
This commit is contained in:
@@ -649,6 +649,12 @@ class KotlinCodeGenerator(
|
||||
when (this) {
|
||||
PType.UNKNOWN -> ANY_NULL
|
||||
PType.NOTHING -> NOTHING
|
||||
PType.MODULE,
|
||||
PType.THIS ->
|
||||
// TODO: support self types: `class Foo<T extends Foo<T>>`
|
||||
throw KotlinCodeGeneratorException(
|
||||
"Pkl `${this}` types are not supported by the Kotlin code generator."
|
||||
)
|
||||
is PType.StringLiteral -> STRING
|
||||
is PType.Class -> {
|
||||
// if in doubt, spell it out
|
||||
|
||||
Reference in New Issue
Block a user