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

:D constraint doesn't work when named #5597

Open
p6rt opened this issue Aug 20, 2016 · 1 comment
Open

:D constraint doesn't work when named #5597

p6rt opened this issue Aug 20, 2016 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 20, 2016

Migrated from rt.perl.org#129005 (status was 'new')

Searchable as RT129005$

@p6rt
Copy link
Author

p6rt commented Aug 20, 2016

From zefram@fysh.org

constant IntD := Int​:D; say IntD.ACCEPTS(Int); say (sub (IntD $a) { $a })(Int)
False
(Int)

Observe that the Int​:D type constraint in this form allows the undefined
Int object through to the sub. I think this is a bug. Its .ACCEPTS
method works fine in this form, and the constraint works in both places
if referred to as "Int​:D" rather than "IntD".

-zefram

@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