sophiajt / june

MIT License
803 stars 31 forks source link

Function params are leaking into outer scope #6

Closed sophiajt closed 10 months ago

sophiajt commented 10 months ago

Example:

fun foo(x: i64) -> i64 {
    return x
}

println(x)

This is happening because the function predecl typecheck isn't creating a new scope when the variables are getting created.

sophiajt commented 10 months ago

Fixed with f460e34617cd4efeea15f74c67827e59c0a0a35b