Skip to content

fix NullPointerException for Kotlin typealias of typealias of lambda#490

Merged
piazzesiNiccolo-GS merged 3 commits intoGuardsquare:masterfrom
huqiuser:master
Aug 20, 2025
Merged

fix NullPointerException for Kotlin typealias of typealias of lambda#490
piazzesiNiccolo-GS merged 3 commits intoGuardsquare:masterfrom
huqiuser:master

Conversation

@huqiuser
Copy link
Copy Markdown
Contributor

fix #309
If the kotlin version is lower than v2.0.0, such as 1.9.0, the following code can reproduce the problem

package com.hello

import androidx.annotation.Keep

typealias typeOne = () -> Unit
typealias typeTwo = typeOne

class KotlinQQ {
    @Keep
    fun testWorld(world: typeTwo) {
    }
}

@rubenpieters
Copy link
Copy Markdown
Contributor

Hey! Thanks for creating your PR. Would it be possible for you to add the test case you mentioned in the test cases here: https://github.com/Guardsquare/proguard/blob/master/base/src/test/kotlin/proguard/shrink/ClassUsageMarkerTest.kt ? That way this will make it easier for us to understand the issue you ran into, and confirm the fix for the problem.

@sonarqubecloud
Copy link
Copy Markdown

@piazzesiNiccolo-GS piazzesiNiccolo-GS merged commit 35ea6d5 into Guardsquare:master Aug 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException for Kotlin typealias of typealias of lambda

3 participants