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

Leading multi-line declarator block on role breaks stubs in composition #5515

Closed
p6rt opened this issue Aug 2, 2016 · 4 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2016

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

Searchable as RT128810$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @ShimmerFairy

<ShimmerFairy> m​: #|(abc) role A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Method 'foo' must be implemented by A because it is required by a role␤at <tmp>​:1␤»
<ShimmerFairy> m​: #|abc␤role A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«OK␤»
<ShimmerFairy> m​: #|[[[abc]]]␤role A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Method 'foo' must be implemented by A because it is required by a role␤at <tmp>​:2␤»

It specifically has to be a _leading_ declarator block, and as seen above it has to be the multi-line (delimited) variety. The single-line variant works fine. Trailing declarator blocks don't break this either. As seen above, the specific choice of delimiters on the declarator block is irrelevant.

@p6rt
Copy link
Author

p6rt commented Sep 23, 2017

From @skids

On Mon, 01 Aug 2016 21​:44​:28 -0700, lue wrote​:

<ShimmerFairy> m​: #|(abc) role A { method foo { ... } }; class B does
A { method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Method 'foo' must be implemented by A because it is
required by a role␤at <tmp>​:1␤»
<ShimmerFairy> m​: #|abc␤role A { method foo { ... } }; class B does A
{ method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«OK␤»
<ShimmerFairy> m​: #|[[[abc]]]␤role A { method foo { ... } }; class B
does A { method foo { "OK" } }; say B.foo
<camelia> rakudo-moar f1313d​: OUTPUT«===SORRY!=== Error while
compiling <tmp>␤Method 'foo' must be implemented by A because it is
required by a role␤at <tmp>​:2␤»

It specifically has to be a _leading_ declarator block, and as seen
above it has to be the multi-line (delimited) variety. The single-line
variant works fine. Trailing declarator blocks don't break this
either. As seen above, the specific choice of delimiters on the
declarator block is irrelevant.

This was also reported, fixed, and tests added in RT#​130208, so resolving, since I can't merge it.

Test is at the bottom of S26-documentation/block-leading.t

...though there still may be a heisenbug in this area kicking around I think. Just hard to replicate.

@p6rt
Copy link
Author

p6rt commented Sep 23, 2017

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

@p6rt
Copy link
Author

p6rt commented Sep 23, 2017

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

@p6rt p6rt closed this as completed Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant