?
Unknown Status unknown.
Code
// Test: a `~` INSIDE a string literal is data, never parser mode.
//
// Interpreter source rejects `~` in code position (430_047) because there it
// is the host-embedding marker and marks nothing in pure Koru. That rejection
// MUST NOT reach inside string literals: `"~/notes.txt"` is a home-directory
// path, and a home-directory path is not a dialect question.
//
// This pin exists because the wall could plausibly be written as "reject any
// source containing `~`", which would make the single most common path on a
// unix machine unexpressable. It cannot be written that way.
~import std/runtime
~import std/io
const std = @import("std");
~pub tor open { path: string } -> string
~proc open|zig {
return path;
}
~std/runtime:register(scope: "fs") {
open(1)
}
// The tilde here is INSIDE the string literal — a path, not a mode switch.
const TEST_SOURCE = "open(path: \"~/notes.txt\")";
~std/runtime:run(source: TEST_SOURCE, scope: "fs")
| result _ |> std/io:print.ln("OK")
| exhausted _ |> std/io:print.ln("EXHAUSTED")
| parse-error _ |> std/io:print.ln("PARSE ERROR")
| validation-error _ |> std/io:print.ln("VALIDATION ERROR")
| shape-error _ |> std/io:print.ln("SHAPE ERROR")
| event-denied _ |> std/io:print.ln("EVENT DENIED")
| dispatch-error _ |> std/io:print.ln("DISPATCH ERROR")
| scope-not-found _ |> std/io:print.ln("SCOPE NOT FOUND")
Expected output
OK
Flows
flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "fs", source: open(1))
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: TEST_SOURCE, scope: "fs")
Test Configuration
MUST_RUN