teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.1k stars 108 forks source link

Attempt to index nil value (local 't') #535

Closed Frityet closed 2 years ago

Frityet commented 2 years ago
    Error Error executing command
      ...    /usr/local/share/lua/5.4/tl.lua:7149: attempt to index a nil value (local 't')
      ... stack traceback:
      ...       /usr/local/share/lua/5.4/tl.lua:7149: in upvalue 'find_record_to_extend'
      ...       /usr/local/share/lua/5.4/tl.lua:8441: in local 'bs'
      ...       /usr/local/share/lua/5.4/tl.lua:3084: in upvalue 'extra_callback'
      ...       /usr/local/share/lua/5.4/tl.lua:3225: in local 'fn'
      ...       /usr/local/share/lua/5.4/tl.lua:3293: in upvalue 'recurse'
      ...       /usr/local/share/lua/5.4/tl.lua:3116: in local 'fn'
      ...       /usr/local/share/lua/5.4/tl.lua:3293: in function </usr/local/share/lua/5.4/tl.lua:3273>
      ...       (...tail calls...)
      ...       /usr/local/share/lua/5.4/tl.lua:9012: in function 'tl.type_check'
      ...       (...tail calls...)
      ...       /usr/local/share/lua/5.4/cyan/commands/build.lua:140: in local 'process_node'
      ...       /usr/local/share/lua/5.4/cyan/commands/build.lua:171: in field 'exec'
      ...       /usr/local/share/lua/5.4/cyan/cli.lua:148: in function </usr/local/share/lua/5.4/cyan/cli.lua:147>
      ...       [C]: in function 'xpcall'
      ...       /usr/local/share/lua/5.4/cyan/cli.lua:147: in main chunk
      ...       [C]: in function 'require'
      ...       /usr/local/lib/luarocks/rocks-5.4/cyan/0.1.0-1/bin/cyan:2: in main chunk
      ...       [C]: in ?

Using the latest version of teal from luarocks on MacOS Monterey

hishamhm commented 2 years ago

Thank you for the report! Do you have a minimal snippet of code that reproduces the issue?

Frityet commented 2 years ago

It was any code, just a simple print() would trigger it

hishamhm commented 2 years ago

That's very odd! I cannot reproduce it here, but I just realized this is a duplicate of #526. I'm closing this one since it's a duplicate, but let's track it there!