Files
core/test/rust/fixtures/package/calc/value.dever
T
2026-11-03 03:32:07 +00:00

25 lines
425 B
Plaintext

public type Row {
id: Id
count: Int
}
public type Problem {
error Rejected(message: Text)
}
public adjust(value: Int) (answer: Int) {
answer = value + 1
}
public make(value: Int) (row: Row) {
row = Row { id = dever.id.fromText("雪")
count = value }
}
public positive(value: Int >= 0) (answer: Int) {
answer = value
}
public positive(value: Int < 0) (answer: Int) {
fail(Problem.Rejected("negative"))
}