Diagnostic and cause
LinkSource name is not NFC
- Family
- topaz
- Phase
- lex
- Code
TPZ0007
Cause and conditions
The complete name must already be in Unicode 16.0.0 NFC form in the source. This applies to declarations, references, members, fields, label bodies, and template tag names. Check the whole sequence before keyword or tag classification.
Bindings and lookup compare the admitted scalar sequence exactly. They do not normalize a spelling silently or create a second alias. NFC uses canonical equivalence. It does not apply compatibility normalization or case folding.
A non-NFC name produces TPZ0007 during lex. Mark the complete name span, excluding a label's apostrophe and a tag's string delimiter, and suggest its NFC spelling. Review the replacement for collisions before changing the source.
Response
Replace the complete name with its Unicode 16.0.0 NFC spelling. Apply the reviewed spelling consistently to its declaration and references. Report the original name span and suggest the NFC replacement. Do not silently add a lookup alias.
Source evidence
- LL-3 recommendation: NFC source names, combining continuations, and preserved string data at
72a59a31125f - Existing lexical identities TPZ0001 through TPZ0006; TPZ0007 is newly specified by LL-3 at
72a59a31125f - Canonical normalization forms at
Unicode-16.0· 3.11.7 - issues/31 at
a545e8811f8f
Topaz 6.0.0 specifies this diagnostic during lex.
The target message is source name café is not NFC.
The pinned SELF source does not emit this diagnostic.
Source names must already use Unicode 16.0.0 NFC spelling. Reject a non-NFC name during lexing before keyword and tag classification. Report the complete original name span. Exclude a label prefix or string delimiter from that span. Suggest the NFC spelling without adding a lookup alias. Strings retain their exact scalars. The name rule defines accepted source spelling.
Source name is not NFC
Source names must already use Unicode 16.0.0 NFC spelling. Reject a non-NFC name during lexing before keyword and tag classification. Report the complete original name span. Exclude a label prefix or string delimiter from that span. Suggest the NFC spelling without adding a lookup alias. Strings retain their exact scalars. The name rule defines accepted source spelling.
Why
This applies the adopted identifier-normalization.1 decision. The language chapter owns the rejection condition and source span.
Source evidence
- issues/31 at
151141d7bb44
Response
LinkReplace the complete name with its Unicode 16.0.0 NFC spelling. Apply the reviewed spelling consistently to its declaration and references. Report the original name span and suggest the NFC replacement. Do not silently add a lookup alias.
Reproduction and verification
LinkRejected program
Linklet café = 1
No stdout.
Expected result
The matcher describes a Topaz 6.0 target message. Public Topaz 5.21.3 does not implement this diagnostic producer.
Source evidence
- issues/31 at
151141d7bb44
Repaired program
Linklet café: int = 1let 가: int = 2let K: int = 3let value: int = café + 가 + K
Expected result
Expected result
Checking accepts the program. Exit code 0.
The matcher describes a Topaz 6.0 target message. Public Topaz 5.21.3 does not implement this diagnostic producer.
Source evidence
- issues/31 at
151141d7bb44