Skip to content

Record

Given a file named “pen.json” with:

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

Given a file named “Foo.pen” with:

type r {
x number
}
f = \() r {
r{x: 42}
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {
x number
y none
}
f = \() r {
r{x: 42, y: none}
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {}
f = \() r {
r{}
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {
x number
y none
}
f = \(x r) r {
r{...x, y: none}
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {
x number
}
f = \(x r) number {
x.x
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {
x number
}
f = \(x r, y r) boolean {
x == y
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type r {
x number
}
f = \(x r, y r) boolean {
x == y
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

type Foo {
X number
}

And a file named “Bar.pen” with:

import 'Foo
Bar = \() Foo'Foo {
Foo'Foo{X: 42}
}

And a file named “Baz.pen” with:

import 'Bar
f = \() number {
Bar'Bar().X
}

When I run pen build

Then the exit status should be 0.