typecheck: diagnose unknown return types

This commit is contained in:
Hermes Agent
2026-09-09 09:58:07 +00:00
parent 257a4644ad
commit e4859e82d5
7 changed files with 20 additions and 3 deletions
+3
View File
@@ -173,6 +173,9 @@ EXPECTED = {
"tests/typecheck_invalid_expected_type_bad.claro": [
"tests/typecheck_invalid_expected_type_bad.claro:2: CHECK TYPE needs a known type such as NUMBER, TEXT, YESNO, LIST, or MAP, but BANANA is not a Claro type.",
],
"tests/typecheck_invalid_return_type_bad.claro": [
"tests/typecheck_invalid_return_type_bad.claro:1: Function square declares an unknown return type BANANA. Use a Claro type such as NUMBER, TEXT, YESNO, LIST, or MAP.",
],
"tests/typecheck_object_field_unknown_object_bad.claro": [
"tests/typecheck_object_field_unknown_object_bad.claro:5: Object player is not known yet. Create it with NEW ClassName player before setting player.score.",
],