Add this as a self type (#1708)

This commit is contained in:
Jen Basch authored and GitHub committed 2026-09-02 09:04:15 -07:00
1 parent 1208fa9438
commit 2b697015c7
305 files changed
+1487 -561

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -468,6 +468,9 @@ private fun findTypesUsedBy(
)
}
}
PType.THIS -> {
// do nothing, the enclosing PType.Class has already been visited
}
PType.NOTHING -> {}
is PType.Nullable -> {
findTypesUsedBy(type.baseType, enclosingType, enclosingPackage, result)
@@ -347,6 +347,9 @@ internal abstract class PageGenerator<out S>(
PType.MODULE -> {
+"module"
}
PType.THIS -> {
+"this"
}
is PType.StringLiteral -> {
+"\"${type.literal}\""
}
@@ -343,6 +343,9 @@ internal class SearchIndexGenerator(private val outputDir: Path, consoleOut: Out
PType.MODULE -> {
append("module")
}
PType.THIS -> {
append("this")
}
is PType.StringLiteral -> {
append("\\\"${type.literal}\\\"")
}