scrml.dev v0.7.1
Reference › Errors

E-NAME-COLLIDES-RESERVED

A component or type name collides with a reserved structural-element identifier.

Error Compile-time SPEC §4.15 (normative)

What it means

theme and defaults are reserved for scrml's native CSS structural elements. A component or type using either name — in any capitalisation, the check is case-insensitive — would make <theme> ambiguous between the language construct and your declaration, so the name is rejected at declaration rather than at each use site.

Minimal reproducer

This is the exact source compiled against the linked compiler and verified to produce E-NAME-COLLIDES-RESERVED.

<program title="p">
    type theme:enum = { A, B }
    <p>x</p>
</>

How to fix

  1. Rename the declaration. Any non-reserved name works; the collision is with the identifier only, not with anything structural about your type.

Related

Specification

Normative text: §4.15, §24.4, §65.9, §65.10, §34. Spec lives at compiler/SPEC.md .

← Reference