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

Does not detect optional starting arg properly #137

Open
Stanzilla opened this issue Jul 23, 2020 · 0 comments
Open

Does not detect optional starting arg properly #137

Stanzilla opened this issue Jul 23, 2020 · 0 comments
Labels
A-standard-library Area: Standard Library C-enhancement Category: Feature request or improvement

Comments

@Stanzilla
Copy link
Contributor

The function has an optional starting as, see https://wow.gamepedia.com/API_hooksecurefunc but I don't see a way for tell Selene about that.

Code:

hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIWeakAurasMultiLineEditBoxInsertLink(...) end)

Config:

[[hooksecurefunc.args]]
type = "table"
required = false
[[hooksecurefunc.args]]
type = "string"
[[hooksecurefunc.args]]
type = "function"

Error:

error[incorrect_standard_library_use]: use of standard_library function hooksecurefunc is incorrect

    ┌── WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua:21:41 ───
    │
 21 │   hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIWeakAurasMultiLineEditBoxInsertLink(...) end)
    │                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected string, received function
@Kampfkarren Kampfkarren added A-standard-library Area: Standard Library C-enhancement Category: Feature request or improvement labels Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-standard-library Area: Standard Library C-enhancement Category: Feature request or improvement
Projects
None yet
Development

No branches or pull requests

2 participants