Skip to content

User class named "Transform" collides with Node stream Transform shim (ctor resolves to unknown __rtsn_ctor_Duplex) #1968

Description

@MarcosBrendonDePaula

Repro

class Transform {
  x: f64;
  constructor() { this.x = 0.0; }
}
const t = new Transform();
error: unsupported in the numeric subset: in fn `__rtsn_ctor_Transform`:
unsupported in the numeric subset: call to unknown function `__rtsn_ctor_Duplex`

A USER-DEFINED class named Transform resolves its ctor against the ambient Node stream shim Transform extends Duplex (rts-node) instead of the user class — and Duplex's ctor isn't wired, so compilation fails. Any project using this very common class name breaks (hit in practice by RTS-MINE's Transform GameObject component; workaround = rename to Transform3D).

Likely the same family as the current rts:node:crypto / rts:node:fs member-resolution failures visible in the suite (723/731 on main as of 2026-07-21): the node shim layer is registering ambient class names that shadow user declarations instead of user code winning.

Expected: a user class declaration always shadows an ambient/prelude class of the same name.

🤖 Encontrada durante a migração do RTS-MINE pro gpu3d.

https://claude.ai/code/session_011tUEJtE2DhLZPgEcT5g3mz

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