neolithos / neolua

A Lua implementation for the Dynamic Language Runtime (DLR).
https://neolua.codeplex.com/
Apache License 2.0
472 stars 76 forks source link

Improper Type Conversion for Overloads #186

Open Falkitop opened 7 months ago

Falkitop commented 7 months ago

NeoLua Version:

Example to reproduce:

function AddAngularForce()
    local r = floatQ.Euler(float3(0, 0.01, 0))
    AngularVelocity= floatQ.Multiply(AngularVelocity, r)
    --Works!
end

function AddAngularForce()
    AngularVelocity= floatQ.Multiply(AngularVelocity, floatQ.Euler(float3(0, 0.01, 0)))
    --Doesnt work!
end

The declarations for context:

    public static floatQ Multiply(ref floatQ q, float n)

    public static floatQ Multiply(ref floatQ a, ref floatQ b)

    public static floatQ Euler(in float3 rotation)

The resulting error is: Neo.lronLua.LuaRuntimeException: No conversion defined from floatQ to Single.