Navigation Menu

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

non-associatives are somehow getting treated as list associatives #5516

Closed
p6rt opened this issue Aug 2, 2016 · 4 comments
Closed

non-associatives are somehow getting treated as list associatives #5516

p6rt opened this issue Aug 2, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2016

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

Searchable as RT128811$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @ajs

From tonight's IRC​:

[01​:01] <harmil> I'm not sure how to read this error​: Only identical
operators may be list associative; since '..' and '..' differ, they are
non-associative and you need to clarify with parentheses
...
[01​:05] <TimToady> m​: say 1 .. 2 .. 3
[01​:05] <+camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Only identical operators may be list associative; since
'..' and '..' differ, they are non-associative and you need to clarify with
parentheses␤at <tmp>​:1␤------> say 1 .. 2⏏ .. 3␤ expectin…»
[01​:05] <TimToady> it's LTA for sure
[01​:06] <TimToady> .. should really be considered non-associative, probably
[01​:06] <harmil> TimToady​: Great example. I'll rakudobug that before I turn
in.
[01​:06] <TimToady> m​: 1 but 2 but 3
[01​:06] <+camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Only identical operators may be list associative; since
'but' and 'but' differ, they are non-associative and you need to clarify
with parentheses␤at <tmp>​:1␤------> 1 but 2⏏ but 3␤ expecti…»
[01​:07] <TimToady> yeah, non-associatives are somehow getting treated as
list associatives
[01​:07] <TimToady> m​: say 1 <=> 2 <=> 3
[01​:07] <+camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Only identical operators may be list associative; since
'<=>' and '<=>' differ, they are non-associative and you need to clarify
with parentheses␤at <tmp>​:1␤------> say 1 <=> 2⏏ <=> 3␤ expe…»
[01​:07] <TimToady> it's just the wrong error

--
Aaron Sherman, M.​:
P​: 617-440-4332 Google Talk, Email and Google Plus​: ajs@​ajs.com
Toolsmith, developer, gamer and life-long student.

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @TimToady

We've split the non-associative exceptions into the base class, X​::Syntax​::NonAssociative, with a subclass off X​::Syntax​::NonListAssociative. nqp's EXPR now calls a different method to fail list associativity, and rakudo provides the alternate method to get the appropriate message.

nqp fix in 9073af7ab6049485a245fce383a034a41603cfd8

rakudo fix in f568db26f85909a2431325491405fea6a1efed87

tests in 5939e74f80322a1288fbd891b24311186b015eb8

1 similar comment
@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @TimToady

We've split the non-associative exceptions into the base class, X​::Syntax​::NonAssociative, with a subclass off X​::Syntax​::NonListAssociative. nqp's EXPR now calls a different method to fail list associativity, and rakudo provides the alternate method to get the appropriate message.

nqp fix in 9073af7ab6049485a245fce383a034a41603cfd8

rakudo fix in f568db26f85909a2431325491405fea6a1efed87

tests in 5939e74f80322a1288fbd891b24311186b015eb8

@p6rt p6rt closed this as completed Aug 2, 2016
@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

@TimToady - Status changed from 'new' to 'resolved'

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