Documentation

PT121 Intentional Failure

Back to documentation index
{
  "@context": "https://nxdlang.org/schema",
  "doc_id": "PT121",
  "title": "PT121 - Intentional Failures",
  "description": "Intentional Test Failures",
  "layer": "Passed Tests",
  "category": "Passed Tests - Nim",
  "keywords": [Nim, Pass, Test],
  "doc_version": "1.0",
  "status": "active"
}

# PT121 Intentional Failure

### NXD Sample:

```nxd
MODULE TEST

FUNC MAIN()
    CONST MSG SET: "NXD TEST"

    PRINTLN(MSG)
```

### Result:

FAIL

### Expected Output:

FAIL - Invalid expression

### Expected Rejection Stage:

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

### Actual Output:

N/A

### Notes:

intentional Parser failure. no IR JSON generated. While parsing a CONST declaration value, the parser encountered a colon token.
A colon is not a valid primary expression and compilation stopped.