Skip to content

Non-public markers aren't handled correctly for functions with default parameters #58

@zsmb13

Description

@zsmb13

When declaring an opt-in annotation and adding that annotation to the nonPublicMarkers configuration, functions that have default parameters are not correctly excluded from the api dump - the generated $default function is still included. A very similar issue to the one fixed in #30.

Example annotation:

@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
annotation class MyInternalApi

An example function:

@MyInternalApi
fun defParamInternalFun(x: Int = 0) {}

The incorrect API dump:

public final class co/zsmb/example/MainKt {
	public static synthetic fun defParamInternalFun$default (IILjava/lang/Object;)V
}

Project with examples and reproducing the issue can be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions