From ec31046d302452f18f43bfd68f19b6d417a1cee1 Mon Sep 17 00:00:00 2001 From: Niels Bross Date: Fri, 10 Jan 2025 22:44:15 +0100 Subject: [PATCH] Added inferred types and missing length function. --- Parsing.jai | 12 +- Semantic_Analysis.jai | 18 ++- Test.jai | 1 + hlsl_builtin.shd => hlsl_builtin.ink | 4 + module.jai | 4 + test/codegen/inferred_types.golden | 24 ++++ test/codegen_all.suite | 1 + test/compile_all.suite | 1 + test/inferred_types.ink | 17 +++ test/lex/inferred_types.golden | 105 ++++++++++++++++++ test/lex_all.suite | 1 + .../parse/field_without_type_specifier.golden | 8 +- test/parse/inferred_types.golden | 18 +++ test/parse_all.suite | 1 + test/semant/inferred_types.golden | 15 +++ test/semant_all.suite | 1 + 16 files changed, 218 insertions(+), 13 deletions(-) rename hlsl_builtin.shd => hlsl_builtin.ink (98%) create mode 100644 test/codegen/inferred_types.golden create mode 100644 test/inferred_types.ink create mode 100644 test/lex/inferred_types.golden create mode 100644 test/parse/inferred_types.golden create mode 100644 test/semant/inferred_types.golden diff --git a/Parsing.jai b/Parsing.jai index 30b8b89..d8b799f 100644 --- a/Parsing.jai +++ b/Parsing.jai @@ -264,7 +264,7 @@ error_node :: (parse_state : *Parse_State, message : string) -> *AST_Node { advance_to_sync_point :: (parse_state : *Parse_State) { while true { if parse_state.current.kind == .TOKEN_SEMICOLON || parse_state.current.kind == .TOKEN_RIGHTBRACE || - parse_state.current.kind == .TOKEN_LEFTBRACE{ + parse_state.current.kind == .TOKEN_LEFTBRACE { break; } advance(parse_state); @@ -644,8 +644,12 @@ field_declaration :: (parse_state : *Parse_State, identifier_token : *Token) -> advance(parse_state); node.array_field = true; } else { - missing_type_specifier(parse_state, identifier_token, "Expected type specifier after field name."); - return node; + if !check(parse_state, .TOKEN_ASSIGN) { + internal_error_message(*parse_state.result.messages, "Unimplemented error message.", parse_state.path); + return node; + } + // missing_type_specifier(parse_state, identifier_token, "Expected type specifier after field name."); + } if check(parse_state, .TOKEN_AT) { @@ -1088,6 +1092,8 @@ parse :: (result : *Compile_Result) { file.ast_root = parse_state.result.root; file.ast_nodes = parse_state.result.nodes; copy_messages(parse_state.result.messages, *result.messages); + + result.had_error |= parse_state.result.had_error; } } diff --git a/Semantic_Analysis.jai b/Semantic_Analysis.jai index 6beebca..144a33e 100644 --- a/Semantic_Analysis.jai +++ b/Semantic_Analysis.jai @@ -1241,9 +1241,14 @@ create_field :: (checker : *Semantic_Checker, node : *AST_Node) -> Type_Variable r := from_handle(checker, rhs); assert(l.type != .Unresolved_Expression && r.type != .Unresolved_Expression); - if !types_compatible(checker, handle, rhs) { - type_mismatch(checker, l.source_node, r.source_node, rhs, handle); - return 0; + if l.type == .Unresolved_Variable { + l.type = r.type; + l.typename = r.typename; + } else { + if !types_compatible(checker, handle, rhs) { + type_mismatch(checker, l.source_node, r.source_node, rhs, handle); + return 0; + } } } @@ -1419,7 +1424,6 @@ check_node :: (checker : *Semantic_Checker, node : *AST_Node) -> Type_Variable_H } } case .TOKEN_ASSIGN; { - if !types_compatible(checker, lhs_var, rhs_var, true) { type_mismatch(checker, node.parent, node.children[1], lhs_var, rhs_var); return 0; @@ -1614,7 +1618,7 @@ add_hlsl_builtins :: (checker : *Semantic_Checker) { append(*sb, "/"); } - append(*sb, "hlsl_builtin.shd"); + append(*sb, "hlsl_builtin.ink"); path := builder_to_string(*sb); @@ -1685,12 +1689,14 @@ check :: (result : *Compile_Result) { array_reserve(*checker.result.messages, 16); init_semantic_checker(*checker, file.ast_root, file.file.path); - + + // @Performance: Should have this built in stuff done earlier and only once add_hlsl_builtins(*checker); type_check(*checker, file.ast_root); file.semantic_check_result = checker.result; + result.had_error |= checker.result.had_error; copy_messages(checker.result.messages, *result.messages); } } diff --git a/Test.jai b/Test.jai index a32e3ad..67e4f8a 100644 --- a/Test.jai +++ b/Test.jai @@ -2,6 +2,7 @@ //~ nbr: General improvements // // [x] Print out all failed tests in a list at the end +// [ ] Use new compiler API with Compile_Result and Compiled_File instead // [ ] Use unix (posix? bash? ascii?) color codes for errors // [ ] Print golden file as green and new output as red diff --git a/hlsl_builtin.shd b/hlsl_builtin.ink similarity index 98% rename from hlsl_builtin.shd rename to hlsl_builtin.ink index c8ac743..54dbfcc 100644 --- a/hlsl_builtin.shd +++ b/hlsl_builtin.ink @@ -83,6 +83,10 @@ int4x4 :: struct { #foreign distance :: (float3, float3) -> float; #foreign distance :: (float4, float4) -> float; +#foreign length :: (float2) -> float; +#foreign length :: (float3) -> float; +#foreign length :: (float4) -> float; + #foreign dot :: (float2, float2) -> float; #foreign dot :: (float3, float3) -> float; #foreign dot :: (float4, float4) -> float; diff --git a/module.jai b/module.jai index 226ca2d..2d4ae7c 100644 --- a/module.jai +++ b/module.jai @@ -401,6 +401,10 @@ compile_file :: (compiler : *Shader_Compiler, paths : []string) -> Compile_Resul check(*result); codegen(*result); + if result.had_error { + return result; + } + for *file : result.files { check_result := file.semantic_check_result; if check_result.vertex_entry_point { diff --git a/test/codegen/inferred_types.golden b/test/codegen/inferred_types.golden new file mode 100644 index 0000000..825439c --- /dev/null +++ b/test/codegen/inferred_types.golden @@ -0,0 +1,24 @@ +float bar(); +float foo(); + +float bar() +{ + return 5.0f; +} + +float foo() +{ + return bar(); +} + +float4 vs_main(float3 pos : POSITION) : SV_POSITION +{ + float f = 2.0f; + int i = 10; + f = foo(); + float2 v2 = float2(2, 2); + float3 v3 = float3(2, 2, 3); + float4 v4 = float4(4, 5, 6, 7); + return float4(1, 1, 1, 1); +} + diff --git a/test/codegen_all.suite b/test/codegen_all.suite index 87c48e9..c939b7c 100644 --- a/test/codegen_all.suite +++ b/test/codegen_all.suite @@ -9,6 +9,7 @@ test/field_assignment.ink codegen test/function_call.ink codegen test/function_call_out_of_order_declaration.ink codegen test/function_call_return.ink codegen +test/inferred_types.ink codegen test/meta_block.ink codegen test/multiple_functions.ink codegen test/multiple_semicolons_everywhere.ink codegen diff --git a/test/compile_all.suite b/test/compile_all.suite index b17e326..58b17f2 100644 --- a/test/compile_all.suite +++ b/test/compile_all.suite @@ -10,6 +10,7 @@ test/function_call.ink compile test/function_call_out_of_order_declaration.ink compile test/function_call_return.ink compile test/functions_with_same_name.ink compile +test/inferred_types.ink compile test/meta_block.ink compile test/multiple_functions.ink compile test/multiple_semicolons_everywhere.ink compile diff --git a/test/inferred_types.ink b/test/inferred_types.ink new file mode 100644 index 0000000..30f8ded --- /dev/null +++ b/test/inferred_types.ink @@ -0,0 +1,17 @@ +bar :: () -> float { + return 5.0; +} + +foo :: () -> float { + return bar(); +} + +vertex main :: (pos : float3 @position) -> float4 @position { + f := 2.0; + i := 10; + f = foo(); + v2 := float2(2, 2); + v3 := float3(2, 2, 3); + v4 := float4(4, 5, 6, 7); + return float4(1, 1, 1, 1); +} \ No newline at end of file diff --git a/test/lex/inferred_types.golden b/test/lex/inferred_types.golden new file mode 100644 index 0000000..146cb73 --- /dev/null +++ b/test/lex/inferred_types.golden @@ -0,0 +1,105 @@ +{kind = TOKEN_IDENTIFIER; ; index = 0 ; length = 3 line = 1 ; column = 0 ; value ='bar'; } +{kind = TOKEN_DOUBLECOLON; ; index = 4 ; length = 2 line = 1 ; column = 4 ; value ='::'; } +{kind = TOKEN_LEFTPAREN; ; index = 7 ; length = 1 line = 1 ; column = 7 ; value ='('; } +{kind = TOKEN_RIGHTPAREN; ; index = 8 ; length = 1 line = 1 ; column = 8 ; value =')'; } +{kind = TOKEN_ARROW; ; index = 10 ; length = 2 line = 1 ; column = 10 ; value ='->'; } +{kind = TOKEN_IDENTIFIER; ; index = 13 ; length = 5 line = 1 ; column = 13 ; value ='float'; } +{kind = TOKEN_LEFTBRACE; ; index = 19 ; length = 1 line = 1 ; column = 19 ; value ='{'; } +{kind = TOKEN_RETURN; ; index = 23 ; length = 6 line = 2 ; column = 0 ; value ='return'; } +{kind = TOKEN_FLOATLITERAL; ; index = 30 ; length = 3 line = 2 ; column = 7 ; value ='5'; } +{kind = TOKEN_SEMICOLON; ; index = 33 ; length = 1 line = 2 ; column = 10 ; value =';'; } +{kind = TOKEN_RIGHTBRACE; ; index = 36 ; length = 1 line = 3 ; column = 0 ; value ='}'; } +{kind = TOKEN_IDENTIFIER; ; index = 41 ; length = 3 line = 5 ; column = 0 ; value ='foo'; } +{kind = TOKEN_DOUBLECOLON; ; index = 45 ; length = 2 line = 5 ; column = 4 ; value ='::'; } +{kind = TOKEN_LEFTPAREN; ; index = 48 ; length = 1 line = 5 ; column = 7 ; value ='('; } +{kind = TOKEN_RIGHTPAREN; ; index = 49 ; length = 1 line = 5 ; column = 8 ; value =')'; } +{kind = TOKEN_ARROW; ; index = 51 ; length = 2 line = 5 ; column = 10 ; value ='->'; } +{kind = TOKEN_IDENTIFIER; ; index = 54 ; length = 5 line = 5 ; column = 13 ; value ='float'; } +{kind = TOKEN_LEFTBRACE; ; index = 60 ; length = 1 line = 5 ; column = 19 ; value ='{'; } +{kind = TOKEN_RETURN; ; index = 64 ; length = 6 line = 6 ; column = 0 ; value ='return'; } +{kind = TOKEN_IDENTIFIER; ; index = 71 ; length = 3 line = 6 ; column = 7 ; value ='bar'; } +{kind = TOKEN_LEFTPAREN; ; index = 74 ; length = 1 line = 6 ; column = 10 ; value ='('; } +{kind = TOKEN_RIGHTPAREN; ; index = 75 ; length = 1 line = 6 ; column = 11 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 76 ; length = 1 line = 6 ; column = 12 ; value =';'; } +{kind = TOKEN_RIGHTBRACE; ; index = 79 ; length = 1 line = 7 ; column = 0 ; value ='}'; } +{kind = TOKEN_VERTEX; ; index = 84 ; length = 6 line = 9 ; column = 0 ; value ='vertex'; } +{kind = TOKEN_IDENTIFIER; ; index = 91 ; length = 4 line = 9 ; column = 7 ; value ='main'; } +{kind = TOKEN_DOUBLECOLON; ; index = 96 ; length = 2 line = 9 ; column = 12 ; value ='::'; } +{kind = TOKEN_LEFTPAREN; ; index = 99 ; length = 1 line = 9 ; column = 15 ; value ='('; } +{kind = TOKEN_IDENTIFIER; ; index = 100 ; length = 3 line = 9 ; column = 16 ; value ='pos'; } +{kind = TOKEN_COLON; ; index = 104 ; length = 1 line = 9 ; column = 20 ; value =':'; } +{kind = TOKEN_IDENTIFIER; ; index = 106 ; length = 6 line = 9 ; column = 22 ; value ='float3'; } +{kind = TOKEN_AT; ; index = 113 ; length = 1 line = 9 ; column = 29 ; value ='@'; } +{kind = TOKEN_IDENTIFIER; ; index = 114 ; length = 8 line = 9 ; column = 30 ; value ='position'; } +{kind = TOKEN_RIGHTPAREN; ; index = 122 ; length = 1 line = 9 ; column = 38 ; value =')'; } +{kind = TOKEN_ARROW; ; index = 124 ; length = 2 line = 9 ; column = 40 ; value ='->'; } +{kind = TOKEN_IDENTIFIER; ; index = 127 ; length = 6 line = 9 ; column = 43 ; value ='float4'; } +{kind = TOKEN_AT; ; index = 134 ; length = 1 line = 9 ; column = 50 ; value ='@'; } +{kind = TOKEN_IDENTIFIER; ; index = 135 ; length = 8 line = 9 ; column = 51 ; value ='position'; } +{kind = TOKEN_LEFTBRACE; ; index = 144 ; length = 1 line = 9 ; column = 60 ; value ='{'; } +{kind = TOKEN_IDENTIFIER; ; index = 151 ; length = 1 line = 10 ; column = 3 ; value ='f'; } +{kind = TOKEN_COLON; ; index = 153 ; length = 1 line = 10 ; column = 5 ; value =':'; } +{kind = TOKEN_ASSIGN; ; index = 154 ; length = 1 line = 10 ; column = 6 ; value ='='; } +{kind = TOKEN_FLOATLITERAL; ; index = 156 ; length = 3 line = 10 ; column = 8 ; value ='2'; } +{kind = TOKEN_SEMICOLON; ; index = 159 ; length = 1 line = 10 ; column = 11 ; value =';'; } +{kind = TOKEN_IDENTIFIER; ; index = 166 ; length = 1 line = 11 ; column = 3 ; value ='i'; } +{kind = TOKEN_COLON; ; index = 168 ; length = 1 line = 11 ; column = 5 ; value =':'; } +{kind = TOKEN_ASSIGN; ; index = 169 ; length = 1 line = 11 ; column = 6 ; value ='='; } +{kind = TOKEN_INTLITERAL; ; index = 171 ; length = 2 line = 11 ; column = 8 ; value ='10'; } +{kind = TOKEN_SEMICOLON; ; index = 173 ; length = 1 line = 11 ; column = 10 ; value =';'; } +{kind = TOKEN_IDENTIFIER; ; index = 180 ; length = 1 line = 12 ; column = 3 ; value ='f'; } +{kind = TOKEN_ASSIGN; ; index = 182 ; length = 1 line = 12 ; column = 5 ; value ='='; } +{kind = TOKEN_IDENTIFIER; ; index = 184 ; length = 3 line = 12 ; column = 7 ; value ='foo'; } +{kind = TOKEN_LEFTPAREN; ; index = 187 ; length = 1 line = 12 ; column = 10 ; value ='('; } +{kind = TOKEN_RIGHTPAREN; ; index = 188 ; length = 1 line = 12 ; column = 11 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 189 ; length = 1 line = 12 ; column = 12 ; value =';'; } +{kind = TOKEN_IDENTIFIER; ; index = 196 ; length = 2 line = 13 ; column = 3 ; value ='v2'; } +{kind = TOKEN_COLON; ; index = 199 ; length = 1 line = 13 ; column = 6 ; value =':'; } +{kind = TOKEN_ASSIGN; ; index = 200 ; length = 1 line = 13 ; column = 7 ; value ='='; } +{kind = TOKEN_IDENTIFIER; ; index = 202 ; length = 6 line = 13 ; column = 9 ; value ='float2'; } +{kind = TOKEN_LEFTPAREN; ; index = 208 ; length = 1 line = 13 ; column = 15 ; value ='('; } +{kind = TOKEN_INTLITERAL; ; index = 209 ; length = 1 line = 13 ; column = 16 ; value ='2'; } +{kind = TOKEN_COMMA; ; index = 210 ; length = 1 line = 13 ; column = 17 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 212 ; length = 1 line = 13 ; column = 19 ; value ='2'; } +{kind = TOKEN_RIGHTPAREN; ; index = 213 ; length = 1 line = 13 ; column = 20 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 214 ; length = 1 line = 13 ; column = 21 ; value =';'; } +{kind = TOKEN_IDENTIFIER; ; index = 221 ; length = 2 line = 14 ; column = 3 ; value ='v3'; } +{kind = TOKEN_COLON; ; index = 224 ; length = 1 line = 14 ; column = 6 ; value =':'; } +{kind = TOKEN_ASSIGN; ; index = 225 ; length = 1 line = 14 ; column = 7 ; value ='='; } +{kind = TOKEN_IDENTIFIER; ; index = 227 ; length = 6 line = 14 ; column = 9 ; value ='float3'; } +{kind = TOKEN_LEFTPAREN; ; index = 233 ; length = 1 line = 14 ; column = 15 ; value ='('; } +{kind = TOKEN_INTLITERAL; ; index = 234 ; length = 1 line = 14 ; column = 16 ; value ='2'; } +{kind = TOKEN_COMMA; ; index = 235 ; length = 1 line = 14 ; column = 17 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 237 ; length = 1 line = 14 ; column = 19 ; value ='2'; } +{kind = TOKEN_COMMA; ; index = 238 ; length = 1 line = 14 ; column = 20 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 240 ; length = 1 line = 14 ; column = 22 ; value ='3'; } +{kind = TOKEN_RIGHTPAREN; ; index = 241 ; length = 1 line = 14 ; column = 23 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 242 ; length = 1 line = 14 ; column = 24 ; value =';'; } +{kind = TOKEN_IDENTIFIER; ; index = 249 ; length = 2 line = 15 ; column = 3 ; value ='v4'; } +{kind = TOKEN_COLON; ; index = 252 ; length = 1 line = 15 ; column = 6 ; value =':'; } +{kind = TOKEN_ASSIGN; ; index = 253 ; length = 1 line = 15 ; column = 7 ; value ='='; } +{kind = TOKEN_IDENTIFIER; ; index = 255 ; length = 6 line = 15 ; column = 9 ; value ='float4'; } +{kind = TOKEN_LEFTPAREN; ; index = 261 ; length = 1 line = 15 ; column = 15 ; value ='('; } +{kind = TOKEN_INTLITERAL; ; index = 262 ; length = 1 line = 15 ; column = 16 ; value ='4'; } +{kind = TOKEN_COMMA; ; index = 263 ; length = 1 line = 15 ; column = 17 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 265 ; length = 1 line = 15 ; column = 19 ; value ='5'; } +{kind = TOKEN_COMMA; ; index = 266 ; length = 1 line = 15 ; column = 20 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 268 ; length = 1 line = 15 ; column = 22 ; value ='6'; } +{kind = TOKEN_COMMA; ; index = 269 ; length = 1 line = 15 ; column = 23 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 271 ; length = 1 line = 15 ; column = 25 ; value ='7'; } +{kind = TOKEN_RIGHTPAREN; ; index = 272 ; length = 1 line = 15 ; column = 26 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 273 ; length = 1 line = 15 ; column = 27 ; value =';'; } +{kind = TOKEN_RETURN; ; index = 280 ; length = 6 line = 16 ; column = 3 ; value ='return'; } +{kind = TOKEN_IDENTIFIER; ; index = 287 ; length = 6 line = 16 ; column = 10 ; value ='float4'; } +{kind = TOKEN_LEFTPAREN; ; index = 293 ; length = 1 line = 16 ; column = 16 ; value ='('; } +{kind = TOKEN_INTLITERAL; ; index = 294 ; length = 1 line = 16 ; column = 17 ; value ='1'; } +{kind = TOKEN_COMMA; ; index = 295 ; length = 1 line = 16 ; column = 18 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 297 ; length = 1 line = 16 ; column = 20 ; value ='1'; } +{kind = TOKEN_COMMA; ; index = 298 ; length = 1 line = 16 ; column = 21 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 300 ; length = 1 line = 16 ; column = 23 ; value ='1'; } +{kind = TOKEN_COMMA; ; index = 301 ; length = 1 line = 16 ; column = 24 ; value =','; } +{kind = TOKEN_INTLITERAL; ; index = 303 ; length = 1 line = 16 ; column = 26 ; value ='1'; } +{kind = TOKEN_RIGHTPAREN; ; index = 304 ; length = 1 line = 16 ; column = 27 ; value =')'; } +{kind = TOKEN_SEMICOLON; ; index = 305 ; length = 1 line = 16 ; column = 28 ; value =';'; } +{kind = TOKEN_RIGHTBRACE; ; index = 308 ; length = 1 line = 17 ; column = 0 ; value ='}'; } +{kind = TOKEN_EOF; ; index = 309 ; length = 0 line = 17 ; column = 1 ; value =''; } diff --git a/test/lex_all.suite b/test/lex_all.suite index 852a8f3..699b02d 100644 --- a/test/lex_all.suite +++ b/test/lex_all.suite @@ -13,6 +13,7 @@ test/function_call_out_of_order_declaration.ink lex test/function_call_return.ink lex test/functions_with_same_name.ink lex test/function_with_int_return.ink lex +test/inferred_types.ink lex test/meta_block.ink lex test/multiple_functions.ink lex test/multiple_semicolons_everywhere.ink lex diff --git a/test/parse/field_without_type_specifier.golden b/test/parse/field_without_type_specifier.golden index 77cd077..f8800b3 100644 --- a/test/parse/field_without_type_specifier.golden +++ b/test/parse/field_without_type_specifier.golden @@ -1,4 +1,4 @@ -test/field_without_type_specifier.ink:2,0: error: Expected type specifier after field name. - x := 5.0; - ^ - \ No newline at end of file +(program + (fun vertex vs_main + [] + (:= x 5))) \ No newline at end of file diff --git a/test/parse/inferred_types.golden b/test/parse/inferred_types.golden new file mode 100644 index 0000000..530b95d --- /dev/null +++ b/test/parse/inferred_types.golden @@ -0,0 +1,18 @@ +(program + (fun bar -> float + [] + (return 5)) + + (fun foo -> float + [] + (return (bar))) + + (fun vertex vs_main -> float4 (@position) + [(:= pos float3 (@position))] + (:= f 2) + (:= i 10) + (= f (foo)) + (:= v2 (float2 2 2)) + (:= v3 (float3 2 2 3)) + (:= v4 (float4 4 5 6 7)) + (return (float4 1 1 1 1)))) \ No newline at end of file diff --git a/test/parse_all.suite b/test/parse_all.suite index 14ae4ac..9c9584c 100644 --- a/test/parse_all.suite +++ b/test/parse_all.suite @@ -13,6 +13,7 @@ test/function_call_out_of_order_declaration.ink parse test/function_call_return.ink parse test/functions_with_same_name.ink parse test/function_with_int_return.ink parse +test/inferred_types.ink parse test/meta_block.ink parse test/multiple_functions.ink parse test/multiple_semicolons_everywhere.ink parse diff --git a/test/semant/inferred_types.golden b/test/semant/inferred_types.golden new file mode 100644 index 0000000..40c9c9d --- /dev/null +++ b/test/semant/inferred_types.golden @@ -0,0 +1,15 @@ +scope (global) [ + [foo] : () -> float + [vertex__vs_main] : (pos : float3) -> float4 + [bar] : () -> float + scope (bar) [] + scope (foo) [] + scope (vertex__vs_main) [ + [v2] : float2 + [i] : int + [v4] : float4 + [pos] : float3 + [v3] : float3 + [f] : float + ] +] diff --git a/test/semant_all.suite b/test/semant_all.suite index 38a7c88..7773b41 100644 --- a/test/semant_all.suite +++ b/test/semant_all.suite @@ -11,6 +11,7 @@ test/function_call_out_of_order_declaration.ink semant test/function_call_return.ink semant test/functions_with_same_name.ink semant test/function_with_int_return.ink semant +test/inferred_types.ink semant test/multiple_functions.ink semant test/multiple_semicolons_everywhere.ink semant test/pass_and_access_struct_fields_in_functions.ink semant