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
use std
type u = union
`Foo int
`Bar
;;
const main = {
var v : u
match v
| `Foo 123: std.put("First branch\n")
| `Foo x: std.put("Got Foo {}\n", x)
| `Bar: std.put("Got Bar\n")
;;
}
Produces
Building
a.out...
6m -I /lib/myr in.myr
ld -o a.out /lib/myr/_myrrt.o in.o -L/lib/myr -L/lib/myr -lstd -lsys
First branch
But I would have expected a compile error.
The text was updated successfully, but these errors were encountered:
On the playground
Produces
But I would have expected a compile error.
The text was updated successfully, but these errors were encountered: