use v6.d.PREVIEW;
use lib $?FILE.IO.parent(2).add("packages");
use Test;
use Test::Util;

# This file is for random bugs that don't really fit well in other places.
# Feel free to move the tests to more appropriate places.

plan 1;

throws-like ｢
    use v6.d.PREVIEW;
    sub foo { whenever Promise.in(2) { say ‘hello’ } }; react foo
｣, Exception, 'whenever not in lexical scope of react throws';

# vim: expandtab shiftwidth=4 ft=perl6
