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

use of undeclared attributes gives not useful line number in error #6255

Open
p6rt opened this issue May 20, 2017 · 3 comments
Open

use of undeclared attributes gives not useful line number in error #6255

p6rt opened this issue May 20, 2017 · 3 comments
Labels
LTA

Comments

@p6rt
Copy link

@p6rt p6rt commented May 20, 2017

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

Searchable as RT131333$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 20, 2017

From @MARTIMM

in perl version 2017.04.3-287-g3e7675a built on MoarVM version
2017.04-64-g6d5ea04
implementing Perl 6.c I see the following error;

t/120-Decimal128.t .. ===SORRY!=== Error while compiling
/home/marcel/Languages/Perl6/Projects/BSON/lib/BSON/Decimal128.pm6
(BSON​::Decimal128)
Attribute $!sstring not declared in class BSON​::Decimal128
at /home/marcel/Languages/Perl6/Projects/BSON/lib/BSON/Decimal128.pm6
(BSON​::Decimal128)​:92

This is a writing error of course of attribute $!string. The line
number however, was at the end of the module and not at the (first)
location where it is used.

Regards,
marcel

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 20, 2017

From @lizmat

On 20 May 2017, at 13​:20, mt1957 (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by mt1957
# Please include the string​: [perl #​131333]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131333 >

in perl version 2017.04.3-287-g3e7675a built on MoarVM version
2017.04-64-g6d5ea04
implementing Perl 6.c I see the following error;

t/120-Decimal128.t .. ===SORRY!=== Error while compiling
/home/marcel/Languages/Perl6/Projects/BSON/lib/BSON/Decimal128.pm6
(BSON​::Decimal128)
Attribute $!sstring not declared in class BSON​::Decimal128
at /home/marcel/Languages/Perl6/Projects/BSON/lib/BSON/Decimal128.pm6
(BSON​::Decimal128)​:92

This is a writing error of course of attribute $!string. The line
number however, was at the end of the module and not at the (first)
location where it is used.

Fixing this would involve remembering where an attribute was first mentioned, as this is fully legal​:

  class A { method a { $!a }; has $!a }

aka, specifying the attribute *after* it was mentioned. So it wouldn’t know it wasn’t defined until it hit the end of the class.

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 20, 2017

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

@p6rt p6rt added the LTA label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.