Open aappddeevv opened 6 years ago
I couldn't reproduce it. Also, the error message seems to be for another tree, not the example one. Could you try to reproduce it in isolation using scastie? Here's an example snippet with monadless and scalajs configured: https://scastie.scala-lang.org/aAKsqOXlRq6rEPttSVrsvA
Here's a project that demonstrates the issue: https://github.com/aappddeevv/scalajs-monadless.git
It worked find under 0.6.x scala-js.
@sjrd mentioned that $bar is the mangled name of the Undef type, which uses a pseudo-union e.g. Undef = A | js.undefined.
Version: (e.g.
0.0.1-SNAPSHOT
) monadless: 0.13 scala-js: 1.0.0-RC2, up from 0.6.21 where it worked fine.Expected behavior
Compile should work.
Actual behavior
Can't typecheck the monadless transformation.
Steps to reproduce the behavior
scala-js non-native JS class that uses UndefOr
code that causes the issue:
Error:
Note there is no monad in there yet, just a constant. However, in the full code I need to do this inside the lift in order to call my monad, fs2.Task.
Workaround
None identified.