test: cover compatibility unknown field annotations
This commit is contained in:
@@ -70,6 +70,7 @@ Still needed:
|
||||
- typed imports/modules
|
||||
- inline method-field annotations must agree with the class `HAS` declaration in both modern `TEACH` / `END` and compatibility `TAKES` / `LEARNED` methods; conflicting annotations now get a repair-oriented diagnostic even when the value's inferred type is otherwise correct.
|
||||
- inline method-field annotations also reject unknown names such as `BANANA`, naming the field and method and suggesting the class-declared type.
|
||||
- compatibility `TEACH ... TAKES ...` / `LEARNED` methods have matching validation for unknown inline field annotations, so older lessons receive the same repair guidance.
|
||||
|
||||
Good starting docs:
|
||||
- `ADVANCED_STATIC_TYPING.md`
|
||||
|
||||
@@ -51,6 +51,7 @@ Keep declared return types honest: `claro typecheck` now reports friendly diagno
|
||||
8d. Keep inline method-field annotations consistent with `HAS` declarations: `claro typecheck` now rejects a conflicting annotation even when the assigned value itself has the class-declared type, and explains which type to use.
|
||||
8e. Keep inline method-field annotation coverage aligned across syntax generations: compatibility `TAKES` / `LEARNED` methods now have matching positive and negative fixtures, so older lessons retain the same class-declared-type guidance.
|
||||
8f. Keep inline method-field annotations learner-facing: an unknown annotation such as `BANANA` now names the field and method and suggests the `HAS` type instead of silently treating the annotation as an expression.
|
||||
8g. Keep unknown inline method-field annotation diagnostics aligned across syntax generations: compatibility `TAKES` / `LEARNED` methods now have matching focused coverage for misspelled annotations.
|
||||
|
||||
### 1. Strong static types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user