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

LTA error message with postcircumfix <> #4359

Closed
p6rt opened this issue Jun 28, 2015 · 7 comments
Closed

LTA error message with postcircumfix <> #4359

p6rt opened this issue Jun 28, 2015 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Jun 28, 2015

Migrated from rt.perl.org#125504 (status was 'resolved')

Searchable as RT125504$

@p6rt
Copy link
Author

p6rt commented Jun 28, 2015

From @AlexDaniel

Code​:
my Str $a = 'x';
say $a{'hello'};

Error​:
postcircumfix​:<{ }> not defined for type Str
  in block <unit> at ./test.pl​:3

The problem is that there is no { } in the code.

Sure, <> is converted to {' '} that's why you get that in the error
message, but it does not justify a LTA error message.

Also, why this is not caught during compile-time? It looks like there is
enough information to do that.

@p6rt
Copy link
Author

p6rt commented Jun 28, 2015

From @AlexDaniel

Obviously, this is a wrong code snippet. I meant this​:

my Str $a = 'x';
say $a<hello>;

On Sun, Jun 28, 2015 at 11​:29 PM, perl6 via RT <perl6-bugs-followup@​perl.org

wrote​:

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding​:
"LTA error message with postcircumfix <>",
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [perl #​125504].

Please include the string​:

     \[perl #&#8203;125504\]

in the subject line of all future correspondence about this issue. To do
so,
you may reply to this message.

                    Thank you,
                    perl6\-bugs\-followup@&#8203;perl\.org

-------------------------------------------------------------------------
Code​:
my Str $a = 'x';
say $a{'hello'};

Error​:
postcircumfix​:<{ }> not defined for type Str
in block <unit> at ./test.pl​:3

The problem is that there is no { } in the code.

Sure, <> is converted to {' '} that's why you get that in the error
message, but it does not justify a LTA error message.

Also, why this is not caught during compile-time? It looks like there is
enough information to do that.

@p6rt
Copy link
Author

p6rt commented Sep 16, 2015

From @skids

On Sun Jun 28 13​:31​:12 2015, alex.jakimenko@​gmail.com wrote​:

Obviously, this is a wrong code snippet. I meant this​:

my Str $a = 'x';
say $a<hello>;
...

Error​:
postcircumfix​:<{ }> not defined for type Str
in block <unit> at ./test.pl​:3

The problem is that there is no { } in the code.

This now says​:

"Type Str does not support associative indexing."

(It would be inefficient to keep the information on
what circumfix was actually used hanging around, but
we are no longer misleading, at least.)

Fix commit bbf39d7
Roast commit e60f683

@p6rt
Copy link
Author

p6rt commented Sep 16, 2015

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

@p6rt
Copy link
Author

p6rt commented Sep 16, 2015

From @usev6

On Tue Sep 15 17​:36​:06 2015, bri@​abrij.org wrote​:

On Sun Jun 28 13​:31​:12 2015, alex.jakimenko@​gmail.com wrote​:

Obviously, this is a wrong code snippet. I meant this​:

my Str $a = 'x';
say $a<hello>;
...

Error​:
postcircumfix​:<{ }> not defined for type Str
in block <unit> at ./test.pl​:3

The problem is that there is no { } in the code.

This now says​:

"Type Str does not support associative indexing."

(It would be inefficient to keep the information on
what circumfix was actually used hanging around, but
we are no longer misleading, at least.)

Fix commit bbf39d7
Roast commit e60f683

Great! I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Sep 16, 2015

From @usev6

On Tue Sep 15 17​:36​:06 2015, bri@​abrij.org wrote​:

On Sun Jun 28 13​:31​:12 2015, alex.jakimenko@​gmail.com wrote​:

Obviously, this is a wrong code snippet. I meant this​:

my Str $a = 'x';
say $a<hello>;
...

Error​:
postcircumfix​:<{ }> not defined for type Str
in block <unit> at ./test.pl​:3

The problem is that there is no { } in the code.

This now says​:

"Type Str does not support associative indexing."

(It would be inefficient to keep the information on
what circumfix was actually used hanging around, but
we are no longer misleading, at least.)

Fix commit bbf39d7
Roast commit e60f683

Great! I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Sep 16, 2015

@usev6 - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant