diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-09 14:43:11 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-09 14:43:11 +0200 |
| commit | 134d3ac4caff6d87c79b0892e57073594cb0064c (patch) | |
| tree | e93c73d59ee50f3bdaa073bb5908ae3c74f7a985 /testsuite/compilable | |
| parent | 244449004fb62adbfd43b81e8dfce7500ca4a7e4 (diff) | |
| download | elna-134d3ac4caff6d87c79b0892e57073594cb0064c.tar.gz | |
Remove Pointer and nil support
Diffstat (limited to 'testsuite/compilable')
| -rw-r--r-- | testsuite/compilable/assign_record_to_base.elna | 4 | ||||
| -rw-r--r-- | testsuite/compilable/generic_alias.elna | 2 | ||||
| -rw-r--r-- | testsuite/compilable/generic_arguments.elna | 4 | ||||
| -rw-r--r-- | testsuite/compilable/generic_const_inference.elna | 6 | ||||
| -rw-r--r-- | testsuite/compilable/generic_inference.elna | 2 | ||||
| -rw-r--r-- | testsuite/compilable/generic_pointee.elna | 3 | ||||
| -rw-r--r-- | testsuite/compilable/opaque_type.elna | 2 | ||||
| -rw-r--r-- | testsuite/compilable/pointer_cast.elna | 8 | ||||
| -rw-r--r-- | testsuite/compilable/traits_size.elna | 2 |
9 files changed, 16 insertions, 17 deletions
diff --git a/testsuite/compilable/assign_record_to_base.elna b/testsuite/compilable/assign_record_to_base.elna index 14bc3f5..3909386 100644 --- a/testsuite/compilable/assign_record_to_base.elna +++ b/testsuite/compilable/assign_record_to_base.elna @@ -8,8 +8,8 @@ type end var - x: ^B := nil - y: ^R := nil + x: ^B + y: ^R begin x := y diff --git a/testsuite/compilable/generic_alias.elna b/testsuite/compilable/generic_alias.elna index da9501a..8450253 100644 --- a/testsuite/compilable/generic_alias.elna +++ b/testsuite/compilable/generic_alias.elna @@ -22,7 +22,7 @@ var boxed: Boxed#[File] begin - chain.next := nil; + chain.next := cast(0u: ^Node#[File]); aliased := raw; raw := aliased; boxed.inner := @chain diff --git a/testsuite/compilable/generic_arguments.elna b/testsuite/compilable/generic_arguments.elna index 1cda57f..7312efe 100644 --- a/testsuite/compilable/generic_arguments.elna +++ b/testsuite/compilable/generic_arguments.elna @@ -20,7 +20,7 @@ return entry_ptr^.key begin entry.key := allocate#[File](#size(File)); - assert(#size(Pair#[File, Word8]) = #size(Pointer) * 2u); - assert(#offset(Pair#[File, Word8], value) = #size(Pointer)); + assert(#size(Pair#[File, Word8]) = #size(^Word8) * 2u); + assert(#offset(Pair#[File, Word8], value) = #size(^Word8)); assert(first#[File, Word8](@entry) = entry.key) end. diff --git a/testsuite/compilable/generic_const_inference.elna b/testsuite/compilable/generic_const_inference.elna index 7ce197f..c9be090 100644 --- a/testsuite/compilable/generic_const_inference.elna +++ b/testsuite/compilable/generic_const_inference.elna @@ -6,9 +6,9 @@ type var slice: []const Word8 - aliased: ConstAlias := nil - nested: NestedConst := nil - direct_const: const ^Word8 := nil + aliased: ConstAlias := cast(0u: ConstAlias) + nested: NestedConst := cast(0u: NestedConst) + direct_const: const ^Word8 := cast(0u: const ^Word8) proc write#[T](fd: Int; buf: ^T; count: Int) -> Int return 0 diff --git a/testsuite/compilable/generic_inference.elna b/testsuite/compilable/generic_inference.elna index 9d7fed6..e5e6e3b 100644 --- a/testsuite/compilable/generic_inference.elna +++ b/testsuite/compilable/generic_inference.elna @@ -25,5 +25,5 @@ return begin store(@files, @f); relay(@bytes, @b); - store(@files, nil) + store(@files, cast(0u: ^File)) end. diff --git a/testsuite/compilable/generic_pointee.elna b/testsuite/compilable/generic_pointee.elna index 5ecaedf..b9ee739 100644 --- a/testsuite/compilable/generic_pointee.elna +++ b/testsuite/compilable/generic_pointee.elna @@ -12,6 +12,5 @@ var f: ^File begin - f := allocate#[File](#size(File)); - assert(f = nil) + f := allocate#[File](#size(File)) end. diff --git a/testsuite/compilable/opaque_type.elna b/testsuite/compilable/opaque_type.elna index 6474337..751e6ce 100644 --- a/testsuite/compilable/opaque_type.elna +++ b/testsuite/compilable/opaque_type.elna @@ -4,7 +4,7 @@ type Alias = Handle var - handle: ^Handle := nil + handle: ^Handle alias: ^Alias proc take(h: ^Handle) -> ^Handle diff --git a/testsuite/compilable/pointer_cast.elna b/testsuite/compilable/pointer_cast.elna index 2b986c0..08f9fe7 100644 --- a/testsuite/compilable/pointer_cast.elna +++ b/testsuite/compilable/pointer_cast.elna @@ -1,9 +1,9 @@ program() var - c: ^Char := nil - p: Pointer := nil + c: ^Char + b: ^Word8 begin - p := c; - c := p + b := cast(c: ^Word8); + c := cast(b: ^Char) end. diff --git a/testsuite/compilable/traits_size.elna b/testsuite/compilable/traits_size.elna index ad49b61..282ff25 100644 --- a/testsuite/compilable/traits_size.elna +++ b/testsuite/compilable/traits_size.elna @@ -4,7 +4,7 @@ var s: Int := cast(#size(Int): Int) a: [10]Int as: Int := cast(#size([10]Int): Int) - p: Int := cast(#size(Pointer): Int) + p: Int := cast(#size(^Word8): Int) begin assert(s > 0); |
