Skip to content

samples/minimal:nativeTest does not compile — property assignment vs generated accessor #195

Description

@monkopedia-coder

samples/minimal:nativeTest fails to compile:

Main.kt:33 — rect.origin = …

The generator emits origin() / _origin(v) rather than a property. That is correct and not a codegen bug: the getter needs a MemScope, so it cannot be a Kotlin property. The sample is what's stale.

Pre-existing — reproduced identically on 0.3.3, so this is not caused by the 0.3.4 migration (PR #193). The context-parameter work (#145/#146) changed the generated shape and this sample was not updated with it; nothing caught the drift because samples/minimal is only ever exercised as far as kplusplusSync in our verification, never nativeTest.

Found during the 0.3.4 migration.

Fix

Update Main.kt to the accessor form. Then decide whether samples/minimal:nativeTest should be part of a verification path so it cannot silently rot again — a sample that doesn't compile is worse than no sample, since it's the first thing a new consumer copies.

Related: #194 also stems from samples/* being too narrow a proving ground (both samples are single-project, hiding a whole class of consumer failure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions