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
my %h = <a 1 b 2>;
for %h.kv -> $k, $v {
say �$k $v�
}
The error message you will get:
===SORRY!=== Error while compiling -e
Variable '$k' is not declared
at -e:6
------> for %h.kv -> �$k, $v {
In a way, this is understandable. I don't know if it is possible to print something better in this case.
However, let's say you realize what is happening. The issue, obviously, is somewhere above the line where you are getting in the error message. In theory, if you delete everything on that line and onwards, the error message would complain about unclosed something, and this will lead the developer to the line which causes the problem.
So let's try it.
Code:
my $x;
say �$x<�;
my %h = <a 1 b 2>;
Result:
Unable to parse quote-words subscript; couldn't find right angle quote
at -e:6
------> <BOL>�<EOL>
expecting any of:
postfix
It says �couldn't find right angle quote� but does not say where the left angle quote was.
It should say �couldn't find right angle quote (corresponding left angle quote was at line X)�. We already have this kind of thing for other unclosed things (e.g. #`{{{ )
Migrated from rt.perl.org#131640 (status was 'new')
Searchable as RT131640$
The text was updated successfully, but these errors were encountered: