Skip to content

Binder: a companion-object module shadows a same-named factory function (TextRange(2)) #78

Closed

Description

@b-re-w

androidx.compose.ui.text.TextRange(2) fails from Python with '_PmModule_androidx_compose_ui_text_TextRange' object is not callable: the top-level factory fun TextRange(index: Int) is bound (TextRange__Int), but the bare base name resolves to the child module created for the class's companion constants (TextRange.Zero). Kotlin's surface has both TextRange(2) and TextRange.Zero; Python should too (U-8).

Found while fixing #73 (its render test uses TextRange__Int as a workaround).

Completion: TextRange(2) and TextRange.Zero both work from Python (module object callable by dispatching to the overload set, or an equivalent design that keeps both); a compose fixture test pins it; stubs express both.

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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