Fable
Fable copied to clipboard
python import error when using Erase with newtype pattern
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.
Thanks for opening this issue. A fix for this should be ready soon 😊