andremm / typedlua

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

Errors with interface names containing types #107

Open Zash opened 7 years ago

Zash commented 7 years ago

Consider the following interface:

interface thing
end

interface stringthinger
    thingify : (string) -> (thing)
end

stuff : stringthinger

Running tlc on a file containing require"things".stuff.thingify("Hello"); gives:

test.tl:1:1: type error, ./things.tld:9:1: syntax error, unexpected 'EOF', expecting ':'
require"things".stuff.thingify("Hello");
^

Renaming the interface to eg _stringthinger makes the error go away.

Noticed while writing type definitions involving a stringprep binding.