Skip to content

Commit

Permalink
Fix a compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg committed Nov 16, 2023
1 parent f851536 commit a870094
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ class InspectedTypes private constructor(

constructor(all: List<ApplicationType>, platformTypeProvider: PlatformTypeProvider) : this(ApplicationTypeContainer.create(all), platformTypeProvider)

private fun lookup(s: String): TypeDescriptor? {
return inspectedCache[s] ?: inspectedCache.computeIfAbsent(s) { s ->
if (s.startsWith("[")) {
private fun lookup(typeName: String): TypeDescriptor? {
return inspectedCache[typeName] ?: inspectedCache.computeIfAbsent(typeName) { _ ->
if (typeName.startsWith("[")) {
// TODO: make up a type descriptor for an array type; we could validate that the element type actually exists
TypeDescriptor {
name = s
name = typeName
superName = "java/lang/Object"
protection = AccessProtection.UNKNOWN
flavor = TypeFlavor.CLASS
extensibility = TypeExtensibility.FINAL
}
} else {
platformTypeProvider.lookupPlatformType(s)
platformTypeProvider.lookupPlatformType(typeName)
}
}
}
Expand Down

0 comments on commit a870094

Please sign in to comment.