Added Windows support for the hello example
All checks were successful
/ test (push) Successful in 16s

This commit is contained in:
Eduard Urbach 2025-07-02 21:56:20 +02:00
parent e833268061
commit 47b4b1f1dd
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
7 changed files with 92 additions and 55 deletions

View file

@ -122,6 +122,21 @@ func (f *Function) Evaluate(expr *expression.Expression) (ssa.Value, error) {
for i, param := range slices.Backward(parameters) {
if !types.Is(param.Type(), fn.Input[i].Typ) {
_, isPointer := fn.Input[i].Typ.(*types.Pointer)
if isPointer {
number, isInt := param.(*ssa.Int)
if isInt && number.Int == 0 {
continue
}
}
// Temporary hack to allow int64 -> uint32 conversion
if types.Is(param.Type(), types.AnyInt) && types.Is(fn.Input[i].Typ, types.AnyInt) {
continue
}
return nil, errors.New(&TypeMismatch{
Encountered: param.Type().Name(),
Expected: fn.Input[i].Typ.Name(),