wiremod/wire

Can't return functions from normal functions

Closed this issue · 1 comments

Description:
Trying to type a normal user-defined function with function type causes an error, Expected function return type or name after function keyword.

To Reproduce:

function function wrapper(Func:function) {
    return function() {
        print("Wrapped!")
        Func()
    }
}

Expected behavior:
The function should act equivalently to the lambda version

let Wrapper = function(Func:function) {
    return function() {
        print("Wrapped!")
        Func()
    }
}

Thanks for the quick fix!