8000 [KSP2] resolved type of `vararg` parameter in functions changed vs KSP1 · Issue #2379 · google/ksp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[KSP2] resolved type of vararg parameter in functions changed vs KSP1 #2379
Closed
@mcarleio

Description

@mcarleio

Having a function like this:

interface Greeter {
    fun hello(vararg names: String) 
}

When going over the vararg paramter, you have a KSValueParameter with it.isVararg = true (both KSP1 and KSP2).

But when you resolve the type of the value paramter, you get different results with KSP1 vs KSP2:

  • KSP1: it.type.resolve() = String
  • KSP2: it.type.resolve() = Array<out String>

Is this intended?

Background is, that I am developing Konvert which needs to know the exact type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0