fix(check): 0.R4 - a misspelled type in a parameter, a result or a field is refused where it is written
`function kind_of(f: CharFact)` for a CharacterFact was taken on trust and failed in the code writer as "member access on non-aggregate". A capitalised type - plain, in a slice, or a generic's argument - must name a declared property, record, state, event, enum, action or packed value type, or a type parameter of its declaration: `kind_of's parameter f: there is no type CharFact`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c35481f344
commit
2eefae0618
10 changed files with 13423 additions and 10801 deletions
6
examples/rejected/unknown_field_type.ludic
Normal file
6
examples/rejected/unknown_field_type.ludic
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# a misspelled type in a field, inside a slice, is refused too
|
||||
program UnknownFieldType {
|
||||
property CharacterFact { kind: int = 0 }
|
||||
property Sheet { facts: []CharFact = null }
|
||||
entry { print("x") }
|
||||
}
|
||||
6
examples/rejected/unknown_type.ludic
Normal file
6
examples/rejected/unknown_type.ludic
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# a misspelled type in a parameter is refused where it is written, not as member access far away
|
||||
program UnknownType {
|
||||
property CharacterFact { kind: int = 0 }
|
||||
function kind_of(f: CharFact) -> int { return f.kind }
|
||||
entry { print(`{kind_of(new CharacterFact)}`) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue