Skip to content
Browse files

ComplexStr needs to exist too

  • Loading branch information...
1 parent 32cb82d commit ca7eb73d4bb66705b82cab8d3cd7579aa6ca1e71 @sorear committed Jan 16, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/CORE.setting
View
2 lib/CORE.setting
@@ -2794,12 +2794,14 @@ role Niecza::Dualvar is Niecza::PseudoStr {
class IntStr is Int does Niecza::Dualvar { }
class RatStr is Rat does Niecza::Dualvar { }
class NumStr is Num does Niecza::Dualvar { }
+class ComplexStr is Complex does Niecza::Dualvar { }
sub val($str) is pure {
$_ = Niecza::NumSyntax.str2num($str);
when Num { return NumStr.new($_, $str) }
when Rat { return RatStr.new($_, $str) }
when Int { return IntStr.new($_, $str) }
+ when Complex { return ComplexStr.new($_, $str) }
fail:
return $str;
CATCH { goto fail; }

0 comments on commit ca7eb73

Please sign in to comment.
Something went wrong with that request. Please try again.