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

Crash when parametarizing enums with DefiniteHOWs #2297

Open
zoffixznet opened this issue Sep 20, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@zoffixznet
Copy link
Contributor

commented Sep 20, 2018

+Zoffix │ m: my Int enum <a b c>; dd a                                                                                                                        │+moritz
1316   +camelia │ rakudo-moar c9432c207: OUTPUT: «::a␤»                                                                                                               │+mst
1316    +Zoffix │ m: my Int:D enum <a b c>; dd a                                                                                                                      │+nativecallable6
1316   +camelia │ rakudo-moar c9432c207: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Cannot find method 'mro' on object of type                                 │+nebuchadnezzar
                │ Perl6::Metamodel::DefiniteHOW␤at <tmp>:1␤»

zoffixznet added a commit that referenced this issue Sep 20, 2018

[6.d] Set non-DefiniteHOW default default for DefiniteHOWs
Per 6.d-prep[^1]: On :U/:D type constrained variables, params, attributes,
and parametarized Arrays/Hashes, use the base type as the default
default in 6.d instead of continuing to use the uninitializeable
DefiniteHOW as the type, which prevents use of `.=` and other constructs.

Fixes R#1493. Does not address enums, which is currently blocked by R#2297

[1] https://github.com/perl6/6.d-prep/blob/dffa2642419a0f481591b9b64b602bfc4c4eb66b/TODO/FEATURES.md#make-default-defaults-for-definitehows-be-normal-types
[2] #1493
[3] #2297

zoffixznet added a commit to perl6/roast that referenced this issue Sep 20, 2018

@zoffixznet

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2018

For record, there's 6.d propspec for default-defaults of DefiniteHOWs. After this bug is fixed, that spec likely needs to be extended to include enums as well: perl6/roast@8c8e8f5

ugexe added a commit to perl6/roast that referenced this issue Dec 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.