✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// VERIFIED REGRESSION TEST - DO NOT MODIFY WITHOUT DISCUSSION
// ============================================================================
// Test 405: Import paths must not start with $ prefix anymore
// Design: The superfluous $ prefix has been removed from the import syntax.
//
// Valid: ~import "std/io"
// Invalid: ~import "$std/io" (dollar prefix is rejected)
const std = @import("std");
// This should fail: import with legacy $ prefix
~import $std/io
~std/io:println(message: "World")
| printed |> _
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected compiler error
error[PARSE003]: import paths must start with an alias (e.g., 'std/io', 'src/helper') - define aliases in koru.json
--> tests/regression/500_INTEGRATION_TESTING/540_VALIDATION/405_import_rejects_dollar_prefix/input.kz:13:1
|
13 | ~import $std/io
| ^