Values and types · rule
syntax.new_keyword
Value created with new.
Area 2, Values and types; not declinable; the next step is usually the agent's.
A value is made with Type(value), or an object with Type { field: value }, without new.
type CustomerNote = Text { max_length: 500}type NoteWasEdited = Bool {}function edited(before: CustomerNote, after: CustomerNote) -> NoteWasEdited { return new NoteWasEdited(before != after)}
error: Jadpo creates a value without `new` --> main.jadpo:8:12 |8 | return new NoteWasEdited(before != after) | ^^^ remove `new` reason: `new` creates an object in JavaScript, TypeScript, Java and C#; Jadpo creates a value with `Type(value)`, or an object with `Type { field: value }`. next: Remove `new` (agent) rule: syntax.new_keyword help: https://jadpo.dev/docs/errors/syntax.new_keywordcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/syntax.new_keyword.md.Built from Jadpo main at a707efb.