LightAndLight / ipso

A functional scripting language.
https://ipso.dev
17 stars 1 forks source link

Disallow duplicate top-level definitions #222

Closed LightAndLight closed 2 years ago

LightAndLight commented 2 years ago

Example:

# bug.ipso
a : Int
a = 1

a : String
a = "hi"

main : IO ()
main = println (debug a)

Expected output:

bug.ipso:5:1: error: already defined
  |
5 | a = "hi"
  | ^

Actual output:

"hi"