Closed mcavanagh closed 6 years ago
struct Thing { a: int; } func returns_ptr(): Thing*; func set_value(): void { returns_ptr().a = 5; }
produces
error: Cannot assign to non-lvalue
Is this intended? Currently resorted to doing
func set_value(): void { thing := returns_ptr(); thing.a = 5; }
Yes, this is a bug. I'm doing the auto-deref logic after the lvalue check. Stay tuned for a fix.
Fixed.
produces
error: Cannot assign to non-lvalue
Is this intended? Currently resorted to doing