✓
Passing This code compiles and runs correctly.
Code
// Test 835: Directory import with dotted event names
//
// Tests the full hierarchy: package.module:category.event()
// - package = raylib (from directory)
// - module = graphics (from graphics.kz file)
// - category.event = z_buffer.render (dotted event name within file)
const std = @import("std");
~import "$app/lib/raylib"
// Full hierarchy: package.module:category.event()
~app.lib.raylib.graphics:z_buffer.render(width: 1024, height: 768)
| drawn |> app.lib.raylib.graphics:z_buffer.clear()
| cleared |> app.lib.raylib.graphics:sprite.draw(x: 100, y: 200)
| drawn |> app.lib.raylib.graphics:texture.load(path: "sprite.png")
| loaded |> _
| failed |> _
Imported Files
// Graphics module with dotted event names
const std = @import("std");
~pub event z_buffer.render { width: i32, height: i32 }
| drawn { pixels: i32 }
~pub event z_buffer.clear {}
| cleared {}
~pub event sprite.draw { x: i32, y: i32 }
| drawn {}
~pub event texture.load { path: []const u8 }
| loaded { texture_id: i32 }
| failed { msg: []const u8 }
~proc z_buffer.render {
return .{ .@"drawn" = .{ .pixels = width * height } };
}
~proc z_buffer.clear {
return .{ .@"cleared" = .{} };
}
~proc sprite.draw {
return .{ .@"drawn" = .{} };
}
~proc texture.load {
return .{ .@"loaded" = .{ .texture_id = 42 } };
}
Test Configuration
Expected Behavior:
BACKEND_COMPILE_ERROR