dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
6 stars 0 forks source link

Inlining an array instantiation can fail #352

Closed dplassgit closed 3 weeks ago

dplassgit commented 1 month ago

E.g.,

f:proc(i:int) {
  x:int[2]
  x[0]=i
  println x[0]
}

f(1)

I think the first x:int[2] is not mapped in the InlineMapper but yet somehow it was still passing tests?

dplassgit commented 3 weeks ago

Fixed in e97cad2225c59a1e56798f0651c2b893981488d2