use v6;
use Test;

# Tests for the HyperWhatever type and its curries

plan 2;

# RT#128880
throws-like ｢HyperWhatever.new｣, X::Cannot::New,
    '.new throws that it cannot be called';

# https://github.com/rakudo/rakudo/issues/1489
subtest 'smartmatch with HyperWhatever type object' => {
    plan 6;
    is-deeply (HyperWhatever ~~ HyperWhatever),   True,  'HW (true)';
    is-deeply (42            ~~ HyperWhatever),   False, 'HW (false)';
    is-deeply (HyperWhatever ~~ HyperWhatever:U), True,  'HW:U (true)';
    is-deeply ('meows'       ~~ HyperWhatever:U), False, 'HW:U (false)';
    is-deeply (((**))        ~~ HyperWhatever:D), True,  'HW:D (true)';
    is-deeply (((*))         ~~ HyperWhatever:D), False, 'HW:D (false)';
}


# vim: ft=perl6

Test we don't curry HyperWhatever:Us
Test we don't curry HyperWhatever:Us

RT#128880:  https://rt.perl.org/Ticket/Display.html?id=128880
R#1489:     https://github.com/rakudo/rakudo/issues/1489
Rakudo fix: https://github.com/rakudo/rakudo/commit/57a1aa7a87
