Skip to content

Check for metatable with __call when asserting callable status#396

Merged
Conni2461 merged 1 commit intonvim-lua:masterfrom
krady21:fix-assert-callable-async
Sep 3, 2022
Merged

Check for metatable with __call when asserting callable status#396
Conni2461 merged 1 commit intonvim-lua:masterfrom
krady21:fix-assert-callable-async

Conversation

@krady21
Copy link
Copy Markdown
Contributor

@krady21 krady21 commented Aug 12, 2022

Found this while trying to wrap() the vim.ui.input offered by dressing.nvim, as it actually overrides the value with a table that implements __call instead of an actual function.

Comment thread lua/plenary/async/async.lua Outdated
Comment thread lua/plenary/async/async.lua Outdated
@krady21 krady21 force-pushed the fix-assert-callable-async branch 2 times, most recently from 4265006 to 5983f6f Compare August 14, 2022 08:22
@krady21 krady21 requested a review from Conni2461 August 15, 2022 13:18
@Conni2461
Copy link
Copy Markdown
Collaborator

Sorry for the late response, i was on vacation. The tests seem now to run but you still need to update the code to follow our styling config. See failing job.

Thanks for the PR :) After that is fixed, ill merge this PR :)

@krady21 krady21 force-pushed the fix-assert-callable-async branch from 5983f6f to 16d8e2f Compare August 30, 2022 18:17
@danielo515
Copy link
Copy Markdown

Is there any workaround until then?

Copy link
Copy Markdown
Collaborator

@Conni2461 Conni2461 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks :)

@Conni2461 Conni2461 merged commit 5ab4f43 into nvim-lua:master Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants