AFAIU this looks fine now:

$ perl6 -e 'sub foo { X::IO::Dir.new(path=>"a", os-error=>"b").fail }; my @a := 
foo(); 1'
Type check failed in binding; expected 'Positional' but got 'Failure'
  in any bind_error at src/vm/moar/Perl6/Ops.nqp:224
  in block <unit> at -e:1

The Failure X::IO::Dir is no longer thrown, but the code dies because @a cannot 
be bound to a non Positional. 

If I add a second element on the rhs of the binding, the code runs fine:

$ ./perl6 -e 'sub foo { X::IO::Dir.new(path=>"a", os-error=>"b").fail }; my @a 
:= foo(), 42; say @a.perl'
(Failure.new(exception => X::IO::Dir.new(path => "a", os-error => "b")), 42)

I'd vote for 'closable with tests'.

Reply via email to