Documentation

PT127 Intentional Failure

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

# PT127 Intentional Failure

### NXD Sample:

```nxd
MODULE TEST

FUNC MAIN()
    CONST READY SET false

    IF NOT READY:
        RETURN null
```

### Result:

FAIL

### Expected Output:

FAIL - Illegal litteral

### Expected Rejection Stage:

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

### Actual Output:

N/A

### Notes:

intentional Parser failure. no IR JSON generated. Valid NXD literal "none" was replaced with unsupported token "null".
Lexer classified "null" as LOWNAME.
Parser rejected token while parsing RETURN expression. NXD doesnt use the word "null" instead it uses the word "none".