On Wed, 23 Dec 2015 20:02:51 -0800, zef...@fysh.org wrote: > Date.new permits the construction of a Date object with the undefined > Int type object as the year number. The undefined object can then be > retrieved through .year. Many other operations on the Date fail as a > result of the undefined year: > > > Date.new(Int,1,1).year.perl > Int > > Date.new(Int,1,1).Str > Invocant requires an instance of type Int, but a type object was > passed. Did you forget a .new? > > Date.new(Int,1,1).perl > Use of uninitialized value $!year of type Int in string context > Any of .^name, .perl, .gist, or .say can stringify undefined things, > if needed. in block <unit> at <unknown file> line 1 > Date.new(,1,1) > > It is nonsensical to construct a Date object that does not have a > specific > integral year number. A better type constraint is required. > > -zefram
Thank you for the report. titsuki++ fixed this. Fix: https://github.com/rakudo/rakudo/commit/038b1ea7601618009ec0fb0018ce259ce4993206 Test: https://github.com/perl6/roast/commit/1ec04ae356