Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsValues and types · rule

type.constraint_loosened

On this page

A type that builds on another sets a looser bound than the one it inherits, such as a higher max_length.

Area 2, Values and types; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A refinement, a type that builds on another, can only add to the rules it inherits. Every rule along the chain still holds, so a value of ShortProductName still needs ProductName's max_length: 120. A looser bound would never apply, and a reader would believe a value can be longer than it can.

What it looks like

main.jadpo:

example
type ProductName = Text {    min_length: 1    max_length: 120}type ShortProductName = ProductName {    max_length: 150}
jadpo checkcheck failed: 1 error, 1 file

error max_length: 150 loosens ProductName's max_length: 120

--> main.jadpo:7:5

  |7 |     max_length: 150  |     ^^^^^^^^^^ looser than `max_length: 120`
reason
A refinement only adds to the rules of the type it builds on, and every rule along the way still holds, so a value still needs max_length: 120 and this one would never apply.
next
Make max_length at most 120, or remove it (agent)
rule
type.constraint_loosened
help
https://jadpo.dev/docs/errors/type.constraint_loosened

(agent) at the end of the next: line means your coding agent can make the fix itself.

How to fix it

If the new type should be stricter, give it a bound within the inherited one:

example
    max_length: 40

A ShortProductName is now at most 40 characters, and it can still be used wherever a ProductName is expected.

If the inherited bound is the one you want, remove the line:

example
type ProductName = Text {    min_length: 1    max_length: 120}type ShortProductName = ProductName {}

ShortProductName keeps ProductName's rules, 1 to 120 characters, and is still its own type.

When the new type really needs longer values, build it on Text itself rather than on ProductName. It then can't be passed where a ProductName is expected without a construction, which checks the shorter bound.

Markdown for agents: /docs/errors/type.constraint_loosened.md.Built from Jadpo main at aee2e8f.