mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-09 16:38:45 +00:00
10 lines
283 B
Text
10 lines
283 B
Text
|
|
struct StructWithRef =
|
||
|
|
& @Int._ // unique pointer to any-sized array (default size is zero ??)
|
||
|
|
|
||
|
|
decl test_memory : Unit -> Unit
|
||
|
|
def test_memory = {
|
||
|
|
const @unique_ref1 <- @5 // move unique reference
|
||
|
|
var @unique_ref2 <- @(Array.of 1 2 3)
|
||
|
|
// ?? reference to constant value ??
|
||
|
|
}
|