-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type identifying where clause behaviour changes when using interfaces loaded via require #853
Comments
I tried reproducing this but could not. Here are exactly the files I used:
I tried Teal master, 0.24.0 and 0.24.1 and I always get the correct generation. |
Thanks for attempting to repro. I tried to narrow down repro steps more, and I realized that it actually does work, as long as I either run teal in the same directory as all these files, or a directory where it can find a tlconfig.lua file that includes the necessary directories such that it can locate all the files by require path. You can repro the issue I had originally by running "tl gen [absolute path to main.tl]" from a directory that is not the one containing main.tl So I assume this is working as intended. Maybe I should always run something like "tl check" before "tl gen" to ensure it doesn't generate invalid lua next time |
I also found another way to fix this is to provide tl with the necessary include directories before running gen via the -I command line switch |
I think we should change the behavior so that |
I'm closing this bug and opening #899, but I think I'm only going to merge that for Teal 0.25 |
The above code prints "is B" when it should print "is not B". If we stop using 'require' and place the contents of the files directly in the above code, then we correctly get "is not B". It seems that when included via files, the compiled lua code is this:
And when not using require it is this:
The text was updated successfully, but these errors were encountered: