.githooks/
compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
boot/
bootstrap/
compiler/
cycles/
dispatch/
format/
host/
integration/
kernel/
loader/
manifests/
mmio/
native/
packages/
runtime/
scheduling/
shared/
errors/
app.manifest
8 B
app.rad
369 B
noise.rad
247 B
support.rad
440 B
app.manifest
8 B
app.rad
983 B
build.rad
12.1 KiB
support.rad
1.7 KiB
slots/
smp/
std/
sync/
termination/
tests/
trap/
verify/
Makefile
9.2 KiB
kernel.rad
776 B
runner.rad
11.6 KiB
vim/
.gitignore
333 B
.gitsigners
224 B
AGENTS.md
8.3 KiB
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
2.5 KiB
README
3.4 KiB
STYLE
3.2 KiB
std.lib
2.1 KiB
std.lib.test
1.1 KiB
test/shared/errors/support.rad
raw
| 1 | //! Dependency with two error types and functions that throw them. |
| 2 | |
| 3 | /// First error type. |
| 4 | export union First: Copy { |
| 5 | Failure, |
| 6 | } |
| 7 | /// Second error type. |
| 8 | export union Second: Copy { |
| 9 | Failure, |
| 10 | } |
| 11 | |
| 12 | /// Throw the first error type. |
| 13 | export fn first() throws (First) { |
| 14 | throw First::Failure; |
| 15 | } |
| 16 | |
| 17 | /// Throw the second error type, from a list that also names the first. |
| 18 | export fn second() throws (First, Second) { |
| 19 | throw Second::Failure; |
| 20 | } |