Documentation

FT207

Back to documentation index
{
  "@context": "https://nxdlang.org/schema",
  "doc_id": "`PT207",
  "title": "PT207",
  "description": "Specialty Semantics Correctly Failed",
  "layer": "Passed Tests",
  "category": "Nim Specialty",
  "keywords": [],
  "doc_version": "1.0",
  "status": "active"
}

### PT207 (intentional failure specialty test)

NXD Sample:

```nxd
MODULE NIM_MOIVE_INVALID_REUSE

FUNC MAIN()
    LET SOURCE SET "NXD"
    MOVE SOURCE TO TARGET
    PRINTLN(SOURCE)

```

Result:

FAIL

Expected Output:

FAIL

Expected Rejection Stage:

[ ] Lexer
[ ] Parser
[ ] AST
[ ] IR
[X] Semantics
[ ] Backend



Actual Output:

```json
{
  "module": {
    "name": "NIM_MOIVE_INVALID_REUSE",
    "imports": []
  },
  "types": [],
  "traits": [],
  "impls": [],
  "functions": [
    {
      "name": "MAIN",
      "params": [],
      "return_type": null,
      "body": [
        {
          "Let": {
            "name": "SOURCE",
            "value": {
              "Literal": {
                "String": "NXD"
              }
            }
          }
        },
        {
          "Expr": {
            "Unary": {
              "kind": "MOVE",
              "expr": {
                "Var": "SOURCE"
              }
            }
          }
        },
        {
          "Expr": {
            "Var": "TO"
          }
        },
        {
          "Expr": {
            "Var": "TARGET"
          }
        },
        {
          "Expr": {
            "Call": {
              "func": "PRINTLN",
              "args": [
                {
                  "Var": "SOURCE"
                }
              ]
            }
          }
        }
      ]
    }
  ],
  "statements": []
}
```

Nim: N/A

Notes:

Outcome: Correctly rejected invalid input
Pipeline classification: Semantic rejection
Diagnostic accuracy: Incorrect
Root cause: MOVE ... TO ... grammar not implemented or not routed
Expected error: Use of SOURCE after move
Actual error: Undefined symbol TO