andremm / typedlua

An Optional Type System for Lua
563 stars 53 forks source link

Diagnostic output: String literals should be given quotes #90

Closed Veltas closed 8 years ago

Veltas commented 8 years ago

String literal types that are, for example, given directly as function arguments are displayed without quotes in the error output. The following line sums up the issue in an amusing way:

math.abs("number")

Which produces the diagnostic:

t.tl:1:1: type error, attempt to pass '(number)' to field 'abs' of input type '(number)'

So really it should say ("number") to disambiguate from (number).