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

Wrong source line number reported for misspelled private class attribute names #6027

Open
p6rt opened this issue Jan 22, 2017 · 3 comments
Open

Comments

@p6rt
Copy link

p6rt commented Jan 22, 2017

Migrated from rt.perl.org#130616 (status was 'open')

Searchable as RT130616$

@p6rt
Copy link
Author

p6rt commented Jan 22, 2017

From agentzh@gmail.com

Hi there

I've just noted that Rakudo 2017.01 reports the wrong line number for
any references of misspelled private class attributes. The minimal
example to reproduce this is as follows​:

class Foo {
  method foo {
  say $!bad;
  }
}

Foo.foo();

Rakudo reports the following​:

===SORRY!=== Error while compiling /home/agentzh/a.p6
Attribute $!bad not declared in class Foo
at /home/agentzh/a.p6​:7
------> }⏏<EOL>

Note the line number is 7 while the offending line is at line 3. It
seems that rakudo always reports the last line of the containing
source file, which is never useful.

I haven't tested any other Rakudo releases yet. So I'm not sure if
it's a long standing issue or just a recent regression.

Thanks for your attention!

Best regards,
-agentzh

@p6rt
Copy link
Author

p6rt commented Mar 10, 2018

From @AlexDaniel

Still reproducible​:

<AlexDaniel> 6c​: class Foo {␤ method foo {␤ say $!bad;␤ }␤ }␤
<committable6> AlexDaniel, ¦6c (28 commits)​: «===SORRY!=== Error while compiling /tmp/Qj1o8IL3bG␤Attribute $!bad not declared in class Foo␤at /tmp/Qj1o8IL3bG​:6␤------> <BOL>⏏<EOL>␤ «exit code = 1»»

On 2017-01-21 16​:47​:53, agentzh@​gmail.com wrote​:

Hi there

I've just noted that Rakudo 2017.01 reports the wrong line number for
any references of misspelled private class attributes. The minimal
example to reproduce this is as follows​:

class Foo {
method foo {
say $!bad;
}
}

Foo.foo();

Rakudo reports the following​:

===SORRY!=== Error while compiling /home/agentzh/a.p6
Attribute $!bad not declared in class Foo
at /home/agentzh/a.p6​:7
------> }⏏<EOL>

Note the line number is 7 while the offending line is at line 3. It
seems that rakudo always reports the last line of the containing
source file, which is never useful.

I haven't tested any other Rakudo releases yet. So I'm not sure if
it's a long standing issue or just a recent regression.

Thanks for your attention!

Best regards,
-agentzh

@p6rt
Copy link
Author

p6rt commented Mar 10, 2018

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant