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

Closure parameter call site types should be checked at compile time if possible #3610

Open
p6rt opened this issue Dec 17, 2014 · 3 comments
Open
Labels
NYI Features not yet implemented

Comments

@p6rt
Copy link

p6rt commented Dec 17, 2014

Migrated from rt.perl.org#123446 (status was 'open')

Searchable as RT123446$

@p6rt
Copy link
Author

p6rt commented Dec 17, 2014

From @hoelzro

The following should fail to compile, even if foo is never called​:

sub foo(&cb​:(Str)) {
  cb(1)
}

@p6rt
Copy link
Author

p6rt commented Dec 2, 2017

From @AlexDaniel

Still NYI (2017.11, HEAD(5929887)).

The logic behind this ticket is correct, because we already do this​:

Code​:
sub foo(Str $x) {}; foo(3)

Result​:
===SORRY!=== Error while compiling -e
Calling foo(Int) will never work with declared signature (Str $x)
at -e​:1
------> sub foo(Str $x) {}; ⏏foo(3)

On 2014-12-16 20​:28​:09, rob@​hoelz.ro wrote​:

The following should fail to compile, even if foo is never called​:

sub foo(&cb​:(Str)) {
cb(1)
}

@p6rt
Copy link
Author

p6rt commented Dec 2, 2017

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

@p6rt p6rt added the NYI Features not yet implemented label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NYI Features not yet implemented
Projects
None yet
Development

No branches or pull requests

1 participant