From 5352e8935007f9890aeb5ef578c5c3f1b9739b2c Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sat, 13 Sep 2025 08:59:59 -0400 Subject: Allow untyped ints to be mapped to floating point types --- src/server/analysis.odin | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 7538fe1..219ce3c 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -313,6 +313,15 @@ are_symbol_untyped_basic_same_typed :: proc(a, b: Symbol) -> (bool, bool) { return true, true } } + // Untyped ints are allowed to map to floats + if untyped.type == .Integer { + names := untyped_map[.Float] + for name in names { + if basic.ident.name == name { + return true, true + } + } + } return false, true } else if untyped_b, ok := b.value.(SymbolUntypedValue); ok { return untyped.type == untyped_b.type, true -- cgit v1.2.3