diff --git a/src/script.cpp b/src/script.cpp index f9da705..05ebbef 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -312,7 +312,7 @@ void Script::handle_special_commands(const std::vector>& scri auto& argvar = *opt_arg_var; if(argvar->type != lvar->type - && !(is_cleo_call && argvar->is_text_var() && lvar->type == VarType::Int)) + && !(false && is_cleo_call && argvar->is_text_var() && lvar->type == VarType::Int)) { program.error(arg_node, "type mismatch in target label"); // TODO more info @@ -359,7 +359,10 @@ void Script::handle_special_commands(const std::vector>& scri if((**arginput).maybe_annotation()) break; if(is_cleo_call && (**arginput).maybe_annotation()) + { + program.error(**arginput, "CLEO_CALL semantics for TEXT_LABEL inputs are still unspecified"); break; + } handle_script_input(**arginput, lvar, is_cleo_call); break; case VarType::Float: diff --git a/test/codegen/cleo_call.sc b/test/codegen/cleo_call.sc index 09082a4..129b137 100644 --- a/test/codegen/cleo_call.sc +++ b/test/codegen/cleo_call.sc @@ -7,11 +7,11 @@ LVAR_TEXT_LABEL text // CHECK-L: CLEO_CALL %MAIN_1 2i8 5i8 5i8 0@ CLEO_CALL sum 0 5 5 a -// CHECK-L: CLEO_CALL %MAIN_1 2i8 "TEXT" 1@s 0@ -CLEO_CALL sum 0 text $text a // sums two pointers +// /////CHECK-L: CLEO_CALL %MAIN_1 2i8 "TEXT" 1@s 0@ +//CLEO_CALL sum 0 text $text a // sums two pointers -// CHECK-L: CLEO_CALL %MAIN_1 2i8 "Test Case" 1@s 0@ -CLEO_CALL sum 0 "Test Case" $text a // sums two pointers +// /////CHECK-L: CLEO_CALL %MAIN_1 2i8 "Test Case" 1@s 0@ +//CLEO_CALL sum 0 "Test Case" $text a // sums two pointers TERMINATE_THIS_CUSTOM_SCRIPT } diff --git a/test/semantics/cleo_call_text2.sc b/test/semantics/cleo_call_text2.sc index 94ccd17..d5c15ec 100644 --- a/test/semantics/cleo_call_text2.sc +++ b/test/semantics/cleo_call_text2.sc @@ -5,9 +5,9 @@ LVAR_TEXT_LABEL textvar CLEO_CALL receives_text1 0 "text" // expected-error {{LVAR_TEXT_LABEL is not allowed}} -CLEO_CALL receives_text2 0 "text" -CLEO_CALL receives_text2 0 text -CLEO_CALL receives_text2 0 $textvar +CLEO_CALL receives_text2 0 "text" // expected-error {{unspecified}} +CLEO_CALL receives_text2 0 text // expected-error {{unspecified}} +CLEO_CALL receives_text2 0 $textvar // expected-error {{mismatch}} TERMINATE_THIS_CUSTOM_SCRIPT }