✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// VERIFIED REGRESSION TEST - DO NOT MODIFY WITHOUT DISCUSSION
// ============================================================================
// Test 402: Import paths with ../ must be forbidden
// Security: Prevent directory traversal attacks
// Simplicity: Use explicit path aliases in koru.json instead
~import ../koru_std/io
~io:print.ln("This should never compile!")
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected compiler error
error[PARSE003]: import paths cannot contain '../' - declare an alias for the directory instead: ~std/compiler:paths { name: ../path }
--> tests/regression/500_INTEGRATION_TESTING/540_VALIDATION/402_import_dotdot_forbidden/input.kz:8:1
|
8 | ~import ../koru_std/io
| ^
Flows
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln ("This should never compile!")