This code (for checking the changed timestamp of the current directory):
my $date = ".".IO.changed.DateTime.yyyy-mm-dd but Dateish;
say $date;
yields the error:
«Ambiguous call to 'gist(Str+{Dateish}: )'; these signatures all match:: (Str:D: *%_):(Dateish:D: │ avalenn
| *%_) in block <unit> at <tmp> line 1»
Without the Dateish
mix in, the string is simply 2018-05-12
. Using any other kind of Dateish
function, like .week-year
also yields a different error:
«Str+{Dateish}Invocant of method 'Bridge' must be an object instance of type 'Int', not a type │ a3r0
| object of type 'Int'. Did you forget a '.new'? in block <unit> at <tmp> line 1»
Does it simply mean that you can't mix in a string with Dateish? I've done something similar with hours without a problem.