All codes › Parse
KEXEP-0011
error SingleLetterTypeNameForType
[KEXEP-0011]: Error, `name` is a type parameter, so it cannot name a type. Give it a longer name
T is a single capital letter, which Kex keeps for type parameters, as in [T]. A type needs a longer name.
type T = Small | Large
example.kex:1:8: [KEXEP-0011]: Error, `T` is a type parameter, so it cannot name a type. Give it a longer name
|
1 | type T = Small | Large
| ^
The same rule gives KEXEP-0020 for a record and KEXEP-0101 for a variable.
Fixing it
type Size = Small | Large
main do
IO.printLine(Small)
end
Is this diagnostic reported where it should not be, missing where it should be, or saying the wrong thing? Report it on the compiler's issue tracker.