Closed parkerlamb closed 4 months ago
ols incorrectly raises a syntax error when assigning a proc to a struct variable.
proc
Example:
package test import "core:fmt" main :: proc() { MyStruct :: struct { do_action: proc() } my_struct := MyStruct { do_action = proc() { fmt.println("Action called!") } } my_struct.do_action() }
ols says expected '}' after compound literal, got 'newline' on line 13, while running the same code with odin correctly prints Action called!.
expected '}' after compound literal, got 'newline'
Action called!
ols version: v0.1.27 (vscode) odin version: dev-2024-02:539cec74
v0.1.27
dev-2024-02:539cec74
This is caused by and issue with core:odin/parser not being in sync with the odin compiler. It has to be fixed in Odin.
core:odin/parser
ols incorrectly raises a syntax error when assigning a
proc
to a struct variable.Example:
ols says
expected '}' after compound literal, got 'newline'
on line 13, while running the same code with odin correctly printsAction called!
.ols version:
v0.1.27
(vscode) odin version:dev-2024-02:539cec74