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

Constant interpolation into regexes does not participate in LTM #2800

Closed
p6rt opened this issue Jun 28, 2012 · 6 comments
Closed

Constant interpolation into regexes does not participate in LTM #2800

p6rt opened this issue Jun 28, 2012 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 28, 2012

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

Searchable as RT113884$

@p6rt
Copy link
Author

p6rt commented Jun 28, 2012

From @moritz

< moritz> r​: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
<+p6eval> rakudo 88a9d6​: OUTPUT«a␤»
< moritz> just to be sure, that's supposed to LTM, right?
< pmichaud> aiui, yes.
< TimToady> moritz​: yes, $x should match since the literal prefix is
only used as a tiebreaker

@p6rt
Copy link
Author

p6rt commented Jun 28, 2012

From @moritz

< TimToady> oh, wait
< TimToady> Variable matches are considered declarative if and only if
the variable
< TimToady> is known to represent a constant
< TimToady> nr​: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
<+p6eval> rakudo 88a9d6​: OUTPUT«a␤»
<+p6eval> ..niecza v19-4-g12b71c7​: OUTPUT«ab␤»
< TimToady> so niecza is correct to make a distinction there

@p6rt
Copy link
Author

p6rt commented Jun 28, 2012

@moritz - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 10, 2015

From @coke

On Thu Jun 28 08​:14​:23 2012, moritz wrote​:

< TimToady> oh, wait
< TimToady> Variable matches are considered declarative if and only if
the variable
< TimToady> is known to represent a constant
< TimToady> nr​: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
<+p6eval> rakudo 88a9d6​: OUTPUT«a␤»
<+p6eval> ..niecza v19-4-g12b71c7​: OUTPUT«ab␤»
< TimToady> so niecza is correct to make a distinction there

Tests added to S05-metasyntax/longest-alternative.t

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 24, 2015

From @jnthn

On Thu Jun 28 08​:14​:23 2012, moritz wrote​:

< TimToady> oh, wait
< TimToady> Variable matches are considered declarative if and only if
the variable
< TimToady> is known to represent a constant
< TimToady> nr​: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
<+p6eval> rakudo 88a9d6​: OUTPUT«a␤»
<+p6eval> ..niecza v19-4-g12b71c7​: OUTPUT«ab␤»
< TimToady> so niecza is correct to make a distinction there

Implemented now, and tests unfudged.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 24, 2015

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

@p6rt p6rt closed this as completed Sep 24, 2015
@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