Skip to content

Error

Given a file named “pen.json” with:

{
"type": "library",
"dependencies": {}
}

Given a file named “Foo.pen” with:

f = \() error {
error(none)
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(e error) any {
source(e)
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(x number | error) number | error {
x? + 1
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(x number | none | error) number | error {
if x = x? as number {
x + 1
} else if none {
0
}
}

When I run pen build

Then the exit status should be 0.