Struct field not existing #12

Open
opened 2026-05-25 11:44:53 +10:00 by DiamondNether90 · 0 comments
struct Foo {
   a = 1
   b = "hi"
   c = true
}

x = new Foo
puts x.a
puts x.b
puts x.c // errors, no such type

The last field in the struct seems to just not exist

Also, constructors just don't work

struct Foo {
  constructor() {}
}

x = Foo() // error: Incorrect amount of arguments for function

or

struct Foo {
  constructor(int x) {}
}

x = Foo(1) // error: Types incorrect for function call
```c struct Foo { a = 1 b = "hi" c = true } x = new Foo puts x.a puts x.b puts x.c // errors, no such type ``` The last field in the struct seems to just not exist Also, constructors just don't work ```c struct Foo { constructor() {} } x = Foo() // error: Incorrect amount of arguments for function ``` or ```c struct Foo { constructor(int x) {} } x = Foo(1) // error: Types incorrect for function call ```
max added the Kind/Bug
Priority
Critical
1
Reviewed
Confirmed
1
labels 2026-05-25 13:08:59 +10:00
Sign in to join this conversation.