Skip to content

Commit

Permalink
Test subclass of NaN !=== a NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 18, 2016
1 parent 522a9c7 commit 860dc71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion S02-types/nan.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 24;
plan 26;

# Undeterminate Math results
# see L<"http://mathworld.wolfram.com/Indeterminate.html">
Expand Down Expand Up @@ -55,5 +55,10 @@ ok (my num $ = NaN) === (my num $ = NaN), "NaN value identity (native num)";
is $x, NaN, 'assigning NaN to Num works without errors';
}

{ # RT #129002
my $mynan = my class MyNum is Num {}.new(NaN);
is-deeply $mynan == NaN, False, 'sublcass of NaN !== NaN';
is-deeply $mynan === NaN, False, 'sublcass of NaN !=== NaN';
}

# vim: ft=perl6

0 comments on commit 860dc71

Please sign in to comment.