Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spec undefine is deprecated in 6.d
  • Loading branch information
zoffixznet committed Aug 1, 2018
1 parent e234049 commit e325718
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion MISC/misc-6.d.t
Expand Up @@ -7,7 +7,7 @@ use Test::Util;
# They might be rearranged into other files in the future, but for now, keeping them in this
# file avoids creating a ton of `-6.d.t` files for the sake of single tests.

plan 3;
plan 4;

subtest ':sym<> colonpair on subroutine names is reserved' => {
plan 6;
Expand Down Expand Up @@ -92,4 +92,16 @@ subtest 'native num defaults to 0e0' => {
my num @a; is-deeply @a[0], 0e0, 'native num array unset element';
}

is_run
use v6.d.PREVIEW;
# override any possible deprecation silencers implementations may have
BEGIN %*ENV<RAKUDO_NO_DEPRECATIONS> = 0;
my $x = 42; undefine $x;
my @y = 42; undefine @y;
my %z = :42foo; undefine %z;
($x || @y || %z) and die "failed";
print 'pass';
, {:out<pass>, :err{.contains: 'deprecat'}, :0status},
'use of `undefine` issues deprecation warning in 6.d';

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit e325718

Please sign in to comment.