You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using STRP in a style as is used in FSharPlus, where members can be looked up from a typeclass definition or an specific type, some inlined functions end up generating duplicated functions in the same scope. This results in code with syntax errors such as Uncaught SyntaxError: Identifier 'x_1' has already been declared.
The code to reproduce this is quite convoluted, involving a "typeclass", a container type, and resolution of two instances of the "typeclass". The two inlined resolutions ends up occupying the same scope and any local bindings result in duplicated bindings in the final scope.
Description
When using STRP in a style as is used in FSharPlus, where members can be looked up from a typeclass definition or an specific type, some inlined functions end up generating duplicated functions in the same scope. This results in code with syntax errors such as
Uncaught SyntaxError: Identifier 'x_1' has already been declared
.The code to reproduce this is quite convoluted, involving a "typeclass", a container type, and resolution of two instances of the "typeclass". The two inlined resolutions ends up occupying the same scope and any local bindings result in duplicated bindings in the final scope.
Repro code
https://fable.io/repl/#?code=C4TwDgpgBAwg9gEwgYwDwHICGA+KBeKAH1kRQCgyopRISlkBnfSq1gejak2CgBsJMDHsADucKHABuEAE684mBE0wzoqgI4BXAJaqEUABazowcZklxt+zAFsARtoDmO0C1ZQh3bcig2I92ShtADteEOh4egYACgB9OE1gMESALiDg4AAaKFibYAMENMiUBgBKKCLSNBDgXAJi5DdWT2BvX387QJCw4IiqmPjE5OA0uzg4Xmzc-MK6EvLK+lQxibq5xop3Kha2vwCZdJ7oAElgiwBrCGjyvCatvggebvCoZExeXliAJihozDSAHqYbJ2QF2G53e6saLRIESA4A8FpaI7Hx7ToHBoMNKxKAAKhyUAAtLhYuU7NlMKVNlCqPwnqEXm8Pr9-lAsBDafdmZ8fn9sgBVYLIIzIS4IAB0SAAZphNLxTNKMDJsKVFihldgabSeVAhSKUOKpRBZfLFagsVqWDQ+lEoCJtPlIaj2vtDi8sagoEDsojIe4REZgr8gWrfi70YFkFVTr0ZOq0N67FBcCT1l64ar-axMMF9NEsfCk2GUcAvGiOoEsWD8esmGmGhnk6qtVzfoMkqlvcCcnkCgmytmqAmM5gU8w2xxqAZtEwjlBHI8mM9evoHfkEjwGNHaAZcwgeo5fsckBltNLtIF0AAPWIARnQhkEXF4qkUICgnQgwfovBUEAQak23pKBr3wKA7yHdlMAlaN6FjQIC36CVTguK5SmpFgQJXaBF2ARssHtINfkLOAESpZEI0rTF+kBMcCULBsqlHFNSlwa4KnTbtx1ue4QLZAicHArEULOOBLmuSFMBpbDGV6BdHk9LBsnQOxIUDb8SP6ItQ0ostWgrN1q24hjtKYpZuKze59y0u0yOLPTy1dDE6xrUy7XMjUk1Y1stkk+4R0s2tG28upIX4kcsDWETUPE9DwseT9IrsaLkNiiSgL8ntwRpG0SAyTBwhkDAABUwvuYh4AKortWafTdmo14Y2CONSpUgBRbBohGdN0DKhZ0yqssitK7Byq5ECPwISC2waGkpwYEJHH4Jrqrje0yPOBgsMS2IRyGwrWpqMbwLwhpfkwqgpzAQqZCYMQZHOHaeD22yNWO4LmOOm4FPw7TJJYKcxxu3QJGlVbhrjJgEHEYI4B4IkFLjbgIGhzQwF4ZBtBRpqkHSKAkDsTQjxsUhAc4ABlEACuvdqZBkMi0hPb9WgvK9bwfJ9lFfAQEA-L8fxQP89GenJkUbA6RuO3B3I1SWjoyMafrO-7SiAA&html=Q&css=Q
Expected and actual results
Please provide the expected and actual results.
Related information
4.22.0
The text was updated successfully, but these errors were encountered: