Typing problem: Type'() -> ()' could not be converted into '(any) -> g39

I don’t know much about Luau typing but I am just simply having this warning while putting my mouse over the function.

Type’() → ()’ could not be converted into '(any) → g39

(I have no idea what g39 is supposed to be)

The code is just my attempt to assign a function to a BindableFunction’s OnInvoke property:

--!strict
local bindable: BindableFunction = Instance.new("BindableFunction")
bindable.OnInvoke = function()

end

Anyone know a fix or how to avoid this warning entirely?

1 Like

The code is wrong, it’s supposed to be:

local bindable = Instance.new("BindableFunction")

That gets me the exact same result by the way.

It’s just a bug. Looks like some internal type names or whatever leaking out. Luau’s type checker still has some bugs

Oh, now that I’ve tried with your exact same script, even if I’ve never seen that way of creating an instance, it works fine when invoked and I get no warnings. :thinking:
I guess it’s a bug like @sjr04 said.