Groups
Groups
Sign in
Groups
Groups
vim_dev
Conversations
About
Send feedback
Help
[vim9] E1027 when using try catch
7 views
Skip to first unread message
Dominique Pellé
unread,
Jan 11, 2022, 5:25:03 PM
1/11/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim_dev
Hi
Calling the following vim9 Foo() function gives an error:
E1027: Missing return statement
```
vim9script
def Foo(): string
try
return "foo"
catch
return "bar"
endtry
enddef
Foo()
```
IMO, this function should be fine, it should not cause a E1027 error.
I can work around by adding a return at the end after the entry,
but it's deadcode. All code paths already return.
Regards
Dominique
Reply all
Reply to author
Forward
0 new messages