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

Can't call a sub with a True literal parameter in Rakudo #2600

Closed
p6rt opened this issue Dec 31, 2011 · 5 comments
Closed

Can't call a sub with a True literal parameter in Rakudo #2600

p6rt opened this issue Dec 31, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 31, 2011

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

Searchable as RT107348$

@p6rt
Copy link
Author

p6rt commented Dec 31, 2011

From @masak

<masak> nom​: sub foo(True) { say "OH HAI" }; foo(False)
<p6eval> nom 2b6f86​: OUTPUT«Nominal type check failed for parameter
''; expected Bool but got Bool instead␤ in sub foo [...]
<masak> o.O
* masak submits rakudobug

(1) This should conceivably work.
(2) The error message is mind-boggling.

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

From @jnthn

On Sat Dec 31 11​:22​:43 2011, masak wrote​:

<masak> nom​: sub foo(True) { say "OH HAI" }; foo(False)
<p6eval> nom 2b6f86​: OUTPUT«Nominal type check failed for parameter
''; expected Bool but got Bool instead␤ in sub foo [...]
<masak> o.O
* masak submits rakudobug

(1) This should conceivably work.
(2) The error message is mind-boggling.

Now​:

sub foo(True) { say "OH HAI" }; foo(False)
OH HAI

Which is a little confusing, though under smart-match semantics of
True/False seems to be the correct thing. Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

From @moritz

Tests added to S06-multi/value-based.t

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant