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

NaN in quantifiers is not allowed, message complains about P6opaque (/ .**{NaN..NaN} /) #5806

Closed
p6rt opened this issue Nov 17, 2016 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Nov 17, 2016

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

Searchable as RT130124$

@p6rt
Copy link
Author

p6rt commented Nov 17, 2016

From @AlexDaniel

*Code​:*
say ‘abcefgh’ ~~ / .**{0..NaN} /

*Result​:*
This type cannot unbox to a native integer​: P6opaque, Failure
  in block <unit> at -e line 1

*Code​:*
say ‘abcefgh’ ~~ / .**{NaN..5} /

*Result​:*
This type cannot unbox to a native integer​: P6opaque, Failure
  in block <unit> at -e line 1

Compare that to what happens if you try to use -Inf​:

*Code​:*
say ‘abcefgh’ ~~ / .**{0..-Inf} /

*Result​:*
Range maximum in quantifier (**) cannot be -Inf
  in block <unit> at -e line 1

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

From @zoffixznet

On Thu, 17 Nov 2016 14​:09​:50 -0800, alex.jakimenko@​gmail.com wrote​:

*Code​:*
say ‘abcefgh’ ~~ / .**{0..NaN} /

*Result​:*
This type cannot unbox to a native integer​: P6opaque, Failure
in block <unit> at -e line 1

*Code​:*
say ‘abcefgh’ ~~ / .**{NaN..5} /

*Result​:*
This type cannot unbox to a native integer​: P6opaque, Failure
in block <unit> at -e line 1

Compare that to what happens if you try to use -Inf​:

*Code​:*
say ‘abcefgh’ ~~ / .**{0..-Inf} /

*Result​:*
Range maximum in quantifier (**) cannot be -Inf
in block <unit> at -e line 1

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@681d6be9742e7c0
Test​: Raku/roast@99c822abdeefbbaf0

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

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

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

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

@p6rt p6rt closed this as completed Oct 1, 2017
@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant