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
Describe the bug
Using map(try(s)) for some strategy s will not report a cast insertion, even if there is a cast inserted. This is unlike filter(s), which seems to behave differently and may not even insert a cast.
signature
sorts Test
constructors
Foo : Test
Bar : Test
rules
run = ![Foo(), Bar()]; issue
issue :: List(Test) -> ?
issue = map(try(do-something-with-bar)) // fails, no cast message
// issue = filter(do-something-with-bar) // succeeds, no cast message (and seemingly no cast needed)
do-something-with-bar: Bar() -> ()
with debug(!"Got a bar: ")
Observed behaviour
Exception during evaluation: Cannot cast the following term from Tuple to Test:
()
Expected behaviour
Ideally, this succeeds as this is perfectly fine in Stratego 1. If that is not possible, a message that a cast is being inserted in the map(try(s)).
The text was updated successfully, but these errors were encountered:
Describe the bug
Using
map(try(s))
for some strategys
will not report a cast insertion, even if there is a cast inserted. This is unlikefilter(s)
, which seems to behave differently and may not even insert a cast.Project
Used inside a Spoofax 3 source project.
Versions
metaborg/devenv@fe13745
To Reproduce
Observed behaviour
Expected behaviour
Ideally, this succeeds as this is perfectly fine in Stratego 1. If that is not possible, a message that a cast is being inserted in the map(try(s)).
The text was updated successfully, but these errors were encountered: