@@ -244,7 +244,13 @@ All in `PM/commonTest`, so they run wherever the interpreter loads.
244244 one as an attribute imports it (#35 ) — Kotlin names only. No
245245 member or parameter is renamed; the binder creates no ` pythonx ` module and a real ` pythonx ` package
246246 on disk is what ` import pythonx ` loads. The answer is the same whichever installer
247- (` PythonProxySource ` , ` PythonxAdapter ` ) ran first for a table. ` Status: implemented ` on desktop —
247+ (` PythonProxySource ` , ` PythonxAdapter ` ) ran first for a table. ** A name that is both a function and a
248+ module is callable** (#78 ): Kotlin has ` TextRange(2) ` (a top-level factory) and ` TextRange.Zero ` (a
249+ companion constant), so the module ` androidx.compose.ui.text.TextRange ` is itself callable — calling it
250+ runs the function or overload set of that name in its parent package — while its attributes stay the
251+ companion's constants and functions. One rule with the class case (#73 ): a Kotlin name that is a
252+ constructor or factory is what calling it does, whatever else lives under that name. `Status:
253+ implemented` on desktop —
248254 ` PM/desktopTest/.../pythonx/KotlinNamedSurfaceTest.kt ` , ` BinderNamespaceTest.kt ` , ` ksp-fixtures/compose/.../KotlinSignatureMetadataTest.kt ` .
249255- ** U-9** A Pythonic package can serve extra member names on a Kotlin proxy through one hook,
250256 ` python_multiplatform.binding.add_member_resolver(fn) ` , `fn(kotlin_type_name, requested_name,
@@ -277,6 +283,12 @@ All in `PM/commonTest`, so they run wherever the interpreter loads.
277283 other Kotlin object. ` Status: implemented ` —
278284 ` PM/commonTest/.../pythonx/PythonxPropertyTest.kt ` , ` ksp-fixtures/compose/.../PythonContentRenderTest.kt ` ,
279285 ` AnySlotScalarRenderTest.kt ` , ` MaterialIconsRenderTest.kt ` .
286+ - ** U-11** A KSP-bound function, method or property whose declared return type is a Kotlin class that
287+ has a generated proxy returns an instance of ** that class's proxy** (#94 ), not a generic owner: its
288+ methods and properties work and ` isinstance(result, TheClass) ` holds. The class is found by the declared
289+ return type's Kotlin name; a return type with no generated proxy stays a generic owner object. The
290+ result's ownership is the same as for any owned result. ` Status: implemented ` —
291+ ` ksp-fixtures/app/.../KspClassResultProxyTest.kt ` (red until #94 lands).
280292
281293## 6. Binding prebuilt libraries (Gradle plugin)
282294
@@ -343,6 +355,10 @@ All in `PM/commonTest`, so they run wherever the interpreter loads.
343355 Pythonic stub product belongs to pythonx-compose. ` Status: partial ` — ` GP/stubs/PyiRenderingTest.kt ` ,
344356 ` GP/stubs/TypedStubTest.kt ` , ` GP/stubs/KotlinNamesOnlyStubTest.kt ` ,
345357 ` ksp-fixtures/artifact/.../WalkedArtifactStubTest.kt ` , ` .../StubSignatureAgreesWithRuntimeTest.kt ` ,
358+ ` GP/stubs/CompanionFactoryStubTest.kt ` (#78 : a name that is both a function and a Kotlin-named
359+ module is stubbed in its parent package as one attribute whose type has ` __call__ ` (the function or
360+ its ` @overload ` s) and the module's constants and functions as members — never as a bare ` def ` , which
361+ would hide ` TextRange.Zero ` from a checker),
346362 ` tools/stubs/check-stubs.sh ` (mypy over the Compose stubs). A class whose name is also a function in
347363 its module is ` Any ` — except that a class's own bound constructor is that class's ` __init__ `
348364 (` @overload ` ed for several), so the class keeps its stub, members and properties; a single one's
0 commit comments