Skip to content

Public types nested in internal Kotlin types not marked as internal #682

@jpobst

Description

@jpobst

Context: dotnet/android#4955

Given a public nested type inside a private/internal type in Kotlin:

internal data class ParentType () {
    enum class ChildEnum { VALUE1, VALUE2 }
}

We correctly hide ParentType but we do not hide ChildEnum because we do not check parent visibility. This results in a warning such as this when generator is trying nest the ChildEnum object inside to ParentType object:

warning BG8604: top ancestor ParentType not found for nested type ParentType.ChildEnum 

The good news is ChildEnum will not be bound due to the warning, so the final binding is correct, but we should handle this correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions