Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error for attempt to specify a "my" type at runtime doesn't say what went wrong #5616

Open
p6rt opened this issue Aug 25, 2016 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 25, 2016

Migrated from rt.perl.org#129089 (status was 'new')

Searchable as RT129089$

@p6rt
Copy link
Author

p6rt commented Aug 25, 2016

From @geekosaur

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 p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant