DanielGavin / ols

Language server for Odin
MIT License
440 stars 68 forks source link

ols runtime assertion crash in analysis.odin:158:2 #421

Closed thetarnav closed 2 months ago

thetarnav commented 3 months ago

to replicate:

package bug

Rect :: struct {y: f32}

rect_empty :: Rect{}

foo :: proc (r: Rect, y: f32) -> (res: Rect) {
    res = r
    res.y += y
    return
}

then remove struct {y: f32} from the third line, leaving only Rect ::

it doesn't crash when you have Rect :: from the start after restart

here is the assert that fails:

Screenshot from 2024-07-04 13-28-45

in internal_resolve_type_expression for the res.y selector node

DanielGavin commented 2 months ago

Should be fixed in rename.