From 2d0daf4b905fcbcb0608bc5e92c20d1bc53cb6da Mon Sep 17 00:00:00 2001 From: "Johan B.W. de Vries" Date: Fri, 16 Sep 2022 17:04:13 +0200 Subject: [PATCH] Fixes --- phasm/parser.py | 1 + tests/integration/test_type_checks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phasm/parser.py b/phasm/parser.py index 78486ef..2aa25fc 100644 --- a/phasm/parser.py +++ b/phasm/parser.py @@ -621,6 +621,7 @@ class OurVisitor: varref: Union[ModuleConstantReference, VariableReference] if node.value.id in our_locals: param = our_locals[node.value.id] + node_typ = param.type varref = VariableReference(param.type, param) elif node.value.id in module.constant_defs: constant_def = module.constant_defs[node.value.id] diff --git a/tests/integration/test_type_checks.py b/tests/integration/test_type_checks.py index afc1d1e..1389c2f 100644 --- a/tests/integration/test_type_checks.py +++ b/tests/integration/test_type_checks.py @@ -27,5 +27,5 @@ def func_call() -> i{type_}: """ ast = phasm_parse(code_py) - with pytest.raises(TypingError, match='Signed does not matchq'): + with pytest.raises(TypingError, match='Signed does not match'): phasm_type(ast)