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

Rat literals Misinterpreted as regex in signatures #5757

Closed
p6rt opened this issue Oct 18, 2016 · 3 comments
Closed

Rat literals Misinterpreted as regex in signatures #5757

p6rt opened this issue Oct 18, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 18, 2016

Migrated from rt.perl.org#129911 (status was 'rejected')

Searchable as RT129911$

@p6rt
Copy link
Author

p6rt commented Oct 18, 2016

From @zoffixznet

I kinda thought this would work​:

  <ZoffixW> m​: multi foo (1/3) {}
  <camelia> rakudo-moar 20d37a​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Unable to parse regex; couldn't find final '/'␤at
<tmp>​:1␤------> multi foo (1/3⏏) {}␤ expecting any of​:␤
infix stopper␤»

Given this works​:

  <ZoffixW> m​: multi foo (1.3) {}
  <camelia> rakudo-moar 20d37a​: ( no output )
  <ZoffixW> m​: multi foo (1e3) {}
  <camelia> rakudo-moar 20d37a​: ( no output )
  <ZoffixW> m​: multi foo (1) {}
  <camelia> rakudo-moar 20d37a​: ( no output )

@p6rt
Copy link
Author

p6rt commented Oct 23, 2016

From @zoffixznet

From what I understand, this syntax produces 1 divided by 3, which gets later interpreted into something plague-baring.

To specify a literal Rat, use angled brackets, which works without requiring any fixes​:

<Zoffix> m​: multi foo (<1/3>) {say "Rat!" }; multi foo ($) { say "something else" }; foo 1/3; foo 42
<camelia> rakudo-moar 127b3b​: OUTPUT«Rat!␤something else␤»

Rejecting.

On Tue Oct 18 08​:58​:29 2016, cpan@​zoffix.com wrote​:

I kinda thought this would work​:

 \<ZoffixW> m&#8203;: multi foo \(1/3\) \{\}
 \<camelia> rakudo\-moar 20d37a&#8203;: OUTPUT«===SORRY\!=== Error while  

compiling <tmp>␤Unable to parse regex; couldn't find final '/'␤at
<tmp>​:1␤------> multi foo (1/3⏏) {}␤ expecting any of​:␤
infix stopper␤»

Given this works​:

 \<ZoffixW> m&#8203;: multi foo \(1\.3\) \{\}
 \<camelia> rakudo\-moar 20d37a&#8203;: \( no output \)
 \<ZoffixW> m&#8203;: multi foo \(1e3\) \{\}
 \<camelia> rakudo\-moar 20d37a&#8203;: \( no output \)
 \<ZoffixW> m&#8203;: multi foo \(1\) \{\}
 \<camelia> rakudo\-moar 20d37a&#8203;: \( no output \)

@p6rt p6rt closed this as completed Oct 23, 2016
@p6rt
Copy link
Author

p6rt commented Oct 23, 2016

@zoffixznet - Status changed from 'new' to 'rejected'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant