Allow use of pointers in vectors.

This commit is contained in:
Christoffer Lerno
2023-09-13 10:47:34 +02:00
committed by Christoffer Lerno
parent 1d04b70efe
commit b2ac4b4253
9 changed files with 149 additions and 31 deletions

View File

@@ -0,0 +1,14 @@
module vecpointer;
fn void pointer_add_sub_diff()
{
int[5] a;
int*[<2>] y;
double*[<2>] z = y; // #error: 'int*[<2>]' to 'double*[<2>]'
y / y; // #error: Cannot divide
y % y; // #error: not defined
y * y; // #error: multiply
y ^ y; // #error: not defined
iptr[<2>] g = (iptr[<2>])y;
g | g;
}