001 cross module type basic

✓ Passing This code compiles and runs correctly.

Code

// Test 053: Cross-Module Type Reference (Basic - Parser Level)
//
// Tests that the parser correctly captures cross-module type syntax in the AST.
// The syntax module.path:Type should be parsed and stored with the module path separated.

~event process_user {
    user_data: test_lib.user:User,
    value: i32,
}
| done { success: bool }
input.kz

Expected AST

{
  "module_annotations": [],
  "items": [
    {
      "type": "import_decl",
      "path": "$std/compiler",
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 2,
        "col": 0
      }
    },
    {
      "type": "host_line",
      "module": "input",
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 2,
        "col": 0
      }
    },
    {
      "type": "host_line",
      "module": "input",
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 3,
        "col": 0
      }
    },
    {
      "type": "host_line",
      "module": "input",
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 4,
        "col": 0
      }
    },
    {
      "type": "host_line",
      "module": "input",
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 5,
        "col": 0
      }
    },
    {
      "type": "event_decl",
      "name": "process_user",
      "path": [
        "process_user"
      ],
      "module": "input",
      "input": {
        "fields": [
          {
            "name": "user_data",
            "type": "test_lib.user:User",
            "is_source": false,
            "is_file": false,
            "is_embed_file": false,
            "is_expression": false,
            "is_invocation_meta": false
          },
          {
            "name": "value",
            "type": "i32",
            "is_source": false,
            "is_file": false,
            "is_embed_file": false,
            "is_expression": false,
            "is_invocation_meta": false
          }
        ]
      },
      "branches": [
        {
          "name": "done",
          "payload": {
            "fields": [
              {
                "name": "success",
                "type": "bool",
                "is_source": false,
                "is_file": false,
                "is_embed_file": false,
                "is_expression": false,
                "is_invocation_meta": false
              }
            ]
          }
        }
      ],
      "location": {
        "file": "tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_001_cross_module_type_basic/input.kz",
        "line": 12,
        "col": 0
      }
    }
  ]
}

Test Configuration

PARSER_TEST