aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-13 09:18:19 -0400
committerGitHub <noreply@github.com>2025-09-13 09:18:19 -0400
commit48529c593b435589f142e56367360bf84af3a070 (patch)
tree9457351830b2d7f9e239a237e2ce2e9c55ddc14f
parent6c3e9087b0756115e8725cac0735b0c8e3130064 (diff)
parent07820c46ebeecd9832f8696397322c8998fae028 (diff)
Merge pull request #1005 from BradLewis/fix/allow-untyped-int-use-float-types
Add endian types to the untyped map
-rw-r--r--src/server/analysis.odin10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 219ce3c..7ee9a8f 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -296,12 +296,18 @@ resolve_type_comp_literal :: proc(
return current_symbol, current_comp_lit, true
}
+// odinfmt: disable
untyped_map: map[SymbolUntypedValueType][]string = {
- .Integer = {"int", "uint", "u8", "i8", "u16", "i16", "u32", "i32", "u64", "i64", "u128", "i128", "byte"},
+ .Integer = {
+ "int", "uint", "u8", "i8", "u16", "i16", "u32", "i32", "u64", "i64", "u128", "i128", "byte",
+ "i16le", "i16be", "i32le", "i32be", "i64le", "i64be", "i128le", "i128be",
+ "u16le", "u16be", "u32le", "u32be", "u64le", "u64be", "u128le", "u128be",
+ },
.Bool = {"bool", "b8", "b16", "b32", "b64"},
- .Float = {"f16", "f32", "f64"},
+ .Float = {"f16", "f32", "f64", "f16le", "f16be", "f32le", "f32be", "f64le", "f64be"},
.String = {"string", "cstring"},
}
+// odinfmt: enable
// NOTE: This function is not commutative
are_symbol_untyped_basic_same_typed :: proc(a, b: Symbol) -> (bool, bool) {