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

Make async sub always return Future object #2875

Open
hurricup opened this issue Aug 18, 2024 · 0 comments
Open

Make async sub always return Future object #2875

hurricup opened this issue Aug 18, 2024 · 0 comments

Comments

@hurricup
Copy link
Collaborator

hurricup commented Aug 18, 2024

Follow up on #2873

Our code insight does not understand that async sub return future, not the value

use v5.14;
use Future::AsyncAwait;

async sub mysub{
    return 42
}

my $var = mysub();
say $var;
say $var->get();
hurricup added a commit that referenced this issue Aug 18, 2024
- `await` is now parsed as an unary named operator
- `async`/`await` are now implicitly declared and auto-imported as subs from the package, making completion and quickdoc work as expected

Fixes #2876 #2873
See also: #2878 #2877 #2875
hurricup added a commit that referenced this issue Aug 18, 2024
- `await` is now parsed as an unary named operator
- `async`/`await` are now implicitly declared and auto-imported as subs from the package, making completion and quickdoc work as expected

Fixes #2876 #2873
See also: #2878 #2877 #2875
hurricup added a commit that referenced this issue Aug 18, 2024
- `await` is now parsed as an unary named operator
- `async`/`await` are now implicitly declared and auto-imported as subs from the package, making completion and quickdoc work as expected

Fixes #2876 #2873
See also: #2878 #2877 #2875
hurricup added a commit that referenced this issue Aug 18, 2024
- `await` is now parsed as an unary named operator
- `async`/`await` are now implicitly declared and auto-imported as subs from the package, making completion and quickdoc work as expected

Fixes #2876 #2873
See also: #2878 #2877 #2875
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