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

'&$b()' is parsed wrongly by Rakudo #1724

Closed
p6rt opened this issue Apr 25, 2010 · 7 comments
Closed

'&$b()' is parsed wrongly by Rakudo #1724

p6rt opened this issue Apr 25, 2010 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 25, 2010

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

Searchable as RT74654$

@p6rt
Copy link
Author

p6rt commented Apr 25, 2010

From @masak

<JimmyZ> masak​: alpha is diferent from rakudo
<JimmyZ> masak​: which one is right?
<JimmyZ> alpha​: my $b = &time; say &$b();
<p6eval> alpha 30e0ed​: OUTPUT«1272203938.46735␤»
<JimmyZ> rakudo​: my $b = &time; say &$b();
<p6eval> rakudo e393c7​: OUTPUT«␤»
<masak> rakudo​: my $b = &time; say $b();
<p6eval> rakudo e393c7​: OUTPUT«1272203984.27821␤»
<masak> JimmyZ​: viv seems to indicate that alpha was right there.
<masak> i.e. that &$b() should be parsed as (&$b).()
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

From @coke

On Sun Apr 25 07​:22​:56 2010, masak wrote​:

<JimmyZ> masak​: alpha is diferent from rakudo
<JimmyZ> masak​: which one is right?
<JimmyZ> alpha​: my $b = &time; say &$b();
<p6eval> alpha 30e0ed​: OUTPUT«1272203938.46735␤»
<JimmyZ> rakudo​: my $b = &time; say &$b();
<p6eval> rakudo e393c7​: OUTPUT«␤»
<masak> rakudo​: my $b = &time; say $b();
<p6eval> rakudo e393c7​: OUTPUT«1272203984.27821␤»
<masak> JimmyZ​: viv seems to indicate that alpha was right there.
<masak> i.e. that &$b() should be parsed as (&$b).()
* masak submits rakudobug

Error has changed​:

00​:53 <[Coke]> rakudo​: my $b = &time; say &$b();
00​:53 <p6eval> rakudo 67778a​: OUTPUT«===SORRY!===␤Non-declarative sigil is
  missing its name at line 22, near "&$b();"␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

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

@p6rt
Copy link
Author

p6rt commented Jan 11, 2012

From @coke

On Tue Aug 17 21​:54​:31 2010, coke wrote​:

On Sun Apr 25 07​:22​:56 2010, masak wrote​:

<JimmyZ> masak​: alpha is diferent from rakudo
<JimmyZ> masak​: which one is right?
<JimmyZ> alpha​: my $b = &time; say &$b();
<p6eval> alpha 30e0ed​: OUTPUT«1272203938.46735␤»
<JimmyZ> rakudo​: my $b = &time; say &$b();
<p6eval> rakudo e393c7​: OUTPUT«␤»
<masak> rakudo​: my $b = &time; say $b();
<p6eval> rakudo e393c7​: OUTPUT«1272203984.27821␤»
<masak> JimmyZ​: viv seems to indicate that alpha was right there.
<masak> i.e. that &$b() should be parsed as (&$b).()
* masak submits rakudobug

Error has changed​:

00​:53 <[Coke]> rakudo​: my $b = &time; say &$b();
00​:53 <p6eval> rakudo 67778a​: OUTPUT«===SORRY!===␤Non-declarative
sigil is
missing its name at line 22, near "&$b();"␤»

And again​:

10​:45 < [Coke]> rakudo​: my $b = &time; say &$b();
10​:46 <+p6eval> rakudo 38165a​: OUTPUT«===SORRY!===␤Symbol '&time' not
  predeclared in <anonymous> (/tmp/rmvYisn_Ne​:1)␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 13, 2012

From @moritz

Am 11.01.2012 16​:46, schrieb Will Coleda via RT​:

On Tue Aug 17 21​:54​:31 2010, coke wrote​:

On Sun Apr 25 07​:22​:56 2010, masak wrote​:

<JimmyZ> masak​: alpha is diferent from rakudo
<JimmyZ> masak​: which one is right?
<JimmyZ> alpha​: my $b =&time; say&$b();
<p6eval> alpha 30e0ed​: OUTPUT«1272203938.46735␤»
<JimmyZ> rakudo​: my $b =&time; say&$b();
<p6eval> rakudo e393c7​: OUTPUT«␤»
<masak> rakudo​: my $b =&time; say $b();
<p6eval> rakudo e393c7​: OUTPUT«1272203984.27821␤»
<masak> JimmyZ​: viv seems to indicate that alpha was right there.
<masak> i.e. that&$b() should be parsed as (&$b).()
* masak submits rakudobug

Error has changed​:

00​:53<[Coke]> rakudo​: my $b =&time; say&$b();
00​:53<p6eval> rakudo 67778a​: OUTPUT«===SORRY!===␤Non-declarative
sigil is
missing its name at line 22, near "&$b();"␤»

And again​:

10​:45< [Coke]> rakudo​: my $b =&time; say&$b();
10​:46<+p6eval> rakudo 38165a​: OUTPUT«===SORRY!===␤Symbol '&time' not
predeclared in<anonymous> (/tmp/rmvYisn_Ne​:1)␤»

The problem here is just that 'time' is implemented as a term, not as a
subroutine in the setting. If I do the same thing with something that's
actually a subroutine, it works fine​:

09​:46 < moritz> nom​: sub f { 6 }; my $b = &f; say &$b()
09​:46 <+p6eval> nom 47540c​: OUTPUT«6␤»

likewise if I reference 'time' correctly​:

09​:47 <+p6eval> nom 47540c​: OUTPUT«1326441971␤»
09​:47 < moritz> nom​: my $b = &term​:<time>; &$b()

Can be closed with tests.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Jan 13, 2012

From @moritz

now tested in S02-types/sigils-and-types.t.

@p6rt
Copy link
Author

p6rt commented Jan 13, 2012

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

@p6rt p6rt closed this as completed Jan 13, 2012
@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