-
Notifications
You must be signed in to change notification settings - Fork 1
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
"await" without args does nothing but produces no error #4268
Comments
From @AlexDanielSomehow I expected that "await" without args would wait for everything, but await; is still legal and produces no error or warning. This should probably be a |
From @lizmatA bare await now throws an error (with d841d4e14f04c49a19c32) $ 6 'await' Liz
|
The RT System itself - Status changed from 'new' to 'open' |
From @AlexDanielAlso, this error is not compile-time as I have suggested. Is there any On Wed, May 27, 2015 at 4:52 PM, perl6 via RT <perl6-bugs-followup@perl.org>
|
From @AlexDanielIt does not say "===SORRY!===", is it OK? On Thu, May 28, 2015 at 7:09 PM, Elizabeth Mattijsen via RT <
|
From @lizmatThat is correct. At the moment we cannot catch this elegantly at compile time, because the candidate with the slurpy takes the no arg case as well. So the only way to catch the no arg case, is to create a candidate for it that dies. Which makes it runtime. Since await, from the grammar point of view, is just a sub like any other sub, there is no (easy) way to catch the no arg case in the grammar. It’s for cases like this, I would like to see some language support for specifying a slurpy that takes at least 1 argument (as opposed to currently at least 0). Technically, it *is* possible to create a candidate that takes 1 param + a slurpy, and this cause the no arg case to become a compile time error because of lack of a candidate, but then the error message about which candidates *are* possible, becomes very confusing. So, I think having it die at runtime is the best we can do at the moment. Liz
|
From @usev6I added a simple test (only testing whether bare "await" dies, no check for the error message) to S17-promise/basic.t with commit Raku/roast@305ca31ff7 I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6I added a simple test (only testing whether bare "await" dies, no check for the error message) to S17-promise/basic.t with commit Raku/roast@305ca31ff7 I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125257 (status was 'resolved')
Searchable as RT125257$
The text was updated successfully, but these errors were encountered: