Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python import error when using Erase with newtype pattern #3968

Open
joprice opened this issue Dec 3, 2024 · 0 comments
Open

python import error when using Erase with newtype pattern #3968

joprice opened this issue Dec 3, 2024 · 0 comments

Comments

@joprice
Copy link
Contributor

joprice commented Dec 3, 2024

Description

When using Erase with a single member DU, the generated python throws an import error when trying to import the Erased type, whereas the same code works in JS.

Repro code

open Fable.Core

[<Erase>]
type X = X of int

// in some other file
let y(x: X) = x

Expected and actual results

The Erase annotation should replace the application and destructuring of the type with bare references, but ends up attemptig to import the non-existent type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant