You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Someone in IRC last night was trying to figure out how to specify a
variable's type at runtime.
[25 03:18] <avuserow_> m: my Int $foo = 999; my $t = int8; say (my $t $ =
$foo); # can I do the type indirectly?
[25 03:18] <camelia> rakudo-moar 547fc5: OUTPUT«===SORRY!===
[25 03:18] Two terms in a row
[25 03:18] at <tmp>:1
[25 03:18] ------> Int $foo = 999; my $t = int8; say (my $t⏏ $ = $foo); #
can I do the type indirect
[25 03:18] expecting any of:
[25 03:18] constraint
[25 03:18] infix
[25 03:18] infix stopper
[25 03:18] postfix…»
(...)
[25 03:21] <geekosaur> m: my Int $foo = 999; BEGIN my $t = 'int8'; say (my
::($t) $ = $foo);
[25 03:21] <camelia> rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment
exception produced no message
[25 03:21] in block <unit> at <tmp> line 1
[25 03:21] 
[25 03:21] »
It's fine if that's just not possible, but the error message is somewhat
less than helpful.
--
brandon s allbery kf8nh sine nomine associates
allbery.b@gmail.com ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
p6rt
added
the
LTA
Less Than Awesome; typically an error message that could be better
label
Jan 5, 2020
Migrated from rt.perl.org#129089 (status was 'new')
Searchable as RT129089$
The text was updated successfully, but these errors were encountered: