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

LTA error when post-declaring a grammar #1362

Closed
p6rt opened this issue Oct 14, 2009 · 7 comments
Closed

LTA error when post-declaring a grammar #1362

p6rt opened this issue Oct 14, 2009 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 14, 2009

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

Searchable as RT69760$

@p6rt
Copy link
Author

p6rt commented Oct 14, 2009

From @carbin

[00​:19] <carlin> rakudo​: class Foo { method bar { Quux.parse('OH
HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:19] <p6eval> -rakudo 54cfe4​: OUTPUT«invoke() not implemented in
class 'Capture'␤in Main (file src/gen_setting.pm, line 206)␤»

[00​:20] <moritz_> +that's a less-than-awesome error message, but
you're not allowed to use Quux until it's declared
[00​:21] <carlin> Yeah, I thought that was the problem but the error
didn't help much
[00​:22] <moritz_> +carlin​: feel free to ticket it

[00​:23] <moritz_> +std​: class Foo { method bar { Quux.parse('OH HAI');
} }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:23] <p6eval> -std 28789​: OUTPUT«Illegally post-declared type​:␤
Quux used at line 1␤ok 00​:02 109m␤»

--
Carlin

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @coke

On Wed Oct 14 04​:38​:25 2009, carlin wrote​:

[00​:19] <carlin> rakudo​: class Foo { method bar { Quux.parse('OH
HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:19] <p6eval> -rakudo 54cfe4​: OUTPUT«invoke() not implemented in
class 'Capture'␤in Main (file src/gen_setting.pm, line 206)␤»

[00​:20] <moritz_> +that's a less-than-awesome error message, but
you're not allowed to use Quux until it's declared
[00​:21] <carlin> Yeah, I thought that was the problem but the error
didn't help much
[00​:22] <moritz_> +carlin​: feel free to ticket it

[00​:23] <moritz_> +std​: class Foo { method bar { Quux.parse('OH HAI');
} }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:23] <p6eval> -std 28789​: OUTPUT«Illegally post-declared type​:␤
Quux used at line 1␤ok 00​:02 109m␤»

--
Carlin

Error message seems much more helpful now, but is still not "STD-compliant".

22​:54 < [Coke]> rakudo​: class Foo { method bar { Quux.parse('OH HAI'); } };
  grammar Quux { rule TOP { .* } }; Foo.bar;
22​:55 <+p6eval> rakudo 2808a5​: OUTPUT«Could not find sub &Quux␤ in 'Foo​::bar'
  at line 22​:/tmp/bZA2BcFVXe␤ in main program body at line
  22​:/tmp/bZA2BcFVXe␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Jul 10, 2011

From @masak

<masak> rakudo​: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a =
Foo.new; bar
<p6eval> rakudo 72d158​: OUTPUT«Could not find sub &Foo␤ in 'bar' [...]
<masak> std​: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a = Foo.new; bar
<p6eval> std 37a0cdd​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Illegally
post-declared type​:␤'Foo' used at line 1␤Check failed␤FAILED 00​:01
122m␤»
<masak> ah, that's much better.
* masak submits rakudobug
<masak> nom​: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a = Foo.new; bar
<p6eval> nom​: OUTPUT«Could not find sub &Foo [...]

@p6rt
Copy link
Author

p6rt commented Feb 13, 2012

From @coke

On Tue Jul 27 19​:56​:05 2010, coke wrote​:

On Wed Oct 14 04​:38​:25 2009, carlin wrote​:

[00​:19] <carlin> rakudo​: class Foo { method bar { Quux.parse('OH
HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:19] <p6eval> -rakudo 54cfe4​: OUTPUT«invoke() not implemented in
class 'Capture'␤in Main (file src/gen_setting.pm, line 206)␤»

[00​:20] <moritz_> +that's a less-than-awesome error message, but
you're not allowed to use Quux until it's declared
[00​:21] <carlin> Yeah, I thought that was the problem but the error
didn't help much
[00​:22] <moritz_> +carlin​: feel free to ticket it

[00​:23] <moritz_> +std​: class Foo { method bar { Quux.parse('OH
HAI');
} }; grammar Quux { rule TOP { .* } }; Foo.bar;
[00​:23] <p6eval> -std 28789​: OUTPUT«Illegally post-declared type​:␤
Quux used at line 1␤ok 00​:02 109m␤»

--
Carlin

Error message seems much more helpful now, but is still not "STD-
compliant".

22​:54 < [Coke]> rakudo​: class Foo { method bar { Quux.parse('OH HAI');
} };
grammar Quux { rule TOP { .* } }; Foo.bar;
22​:55 <+p6eval> rakudo 2808a5​: OUTPUT«Could not find sub &Quux␤ in
'Foo​::bar'
at line 22​:/tmp/bZA2BcFVXe␤ in main program body at
line
22​:/tmp/bZA2BcFVXe␤»

Changed again​:

21​:55 < [Coke]> rakudo​: class Foo { method bar { Quux.parse('OH HAI'); } };
  grammar Quux { rule TOP { .* } }; Foo.bar;
21​:55 <+p6eval> rakudo 29f5cf​: OUTPUT«===SORRY!===␤CHECK FAILED​:␤Undefined
  routine '&Quux' called (line 1)␤»
21​:56 < [Coke]> std​: class Foo { method bar { Quux.parse('OH HAI'); } };
  grammar Quux { rule TOP { .* } }; Foo.bar;
21​:56 <+p6eval> std 52f3895​: OUTPUT«===SORRY!===␤Illegally post-declared type​:␤
  'Quux' used at line 1␤Check failed␤FAILED 00​:01 111m␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 27, 2013

From @timo

rakudo has since gotten a "illegally post-declared type" message. I added
a test to S32-exceptions/misc.t to check that it's reported as a
"post_type".

@p6rt
Copy link
Author

p6rt commented Feb 27, 2013

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

@p6rt p6rt closed this as completed Feb 27, 2013
@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