32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
|
|
// 🧪 Null Literal Support Test
|
||
|
|
|
||
|
|
static box Main {
|
||
|
|
init { console }
|
||
|
|
|
||
|
|
main() {
|
||
|
|
me.console = new ConsoleBox()
|
||
|
|
me.console.log("🧪 Testing Null Literal Support")
|
||
|
|
|
||
|
|
// Test 1: Basic null assignment
|
||
|
|
local null_value = null
|
||
|
|
me.console.log("Null value: " + null_value)
|
||
|
|
|
||
|
|
// Test 2: Non-null assignment
|
||
|
|
local non_null_value = "not null"
|
||
|
|
me.console.log("Non-null value: " + non_null_value)
|
||
|
|
|
||
|
|
// Test 3: Null comparison (if supported)
|
||
|
|
me.console.log("Testing null comparison...")
|
||
|
|
|
||
|
|
// Note: Comparison operators might not be fully working yet
|
||
|
|
// Let's try basic null usage
|
||
|
|
me.console.log("Null variable type: " + null_value.type_name())
|
||
|
|
|
||
|
|
// Test 4: Null in string concatenation
|
||
|
|
local concat_test = "Value is: " + null_value
|
||
|
|
me.console.log("Concatenation with null: " + concat_test)
|
||
|
|
|
||
|
|
me.console.log("✅ Null literal parsing works!")
|
||
|
|
return "Null literal test complete"
|
||
|
|
}
|
||
|
|
}
|