# New Ticket Created by Zoffix Znet
# Please include the string: [perl #126936]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=126936 >
When `is cached` trait is used without declaring `use experimental :cached` the
error message does not mention the fact that experimental is missing, but it
should:
<ZoffixW> m: sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say
yay(1);
<camelia> rakudo-moar a54024: OUTPUT«===SORRY!=== Error while compiling
/tmp/aGuHkHSdB6Can't use unknown trait 'is cached' in a sub declaration.at
/tmp/aGuHkHSdB6:1 expecting any of: rw raw hidden-from-backtrace
hidden-from-USAGE pure default DEPRECATED i…»
Even though it does mention it for macros:
<ZoffixW> m: macro x ($text){}
<camelia> rakudo-moar a54024: OUTPUT«===SORRY!=== Error while compiling
/tmp/C1ZA2QCiesUse of macros is experimental; please 'use experimental
:macros'at /tmp/C1ZA2QCies:1------> macro⏏ x ($text){}»
Original discussion here: http://irclog.perlgeek.de/perl6/2015-12-16#i_11729206