-
Notifications
You must be signed in to change notification settings - Fork 111
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
Next version! #732
Next version! #732
Commits on Aug 31, 2024
-
make type system more nominal, except for unions
Instead of treating nominal records nominally and all other nominal types structurally, with this commit we treat all nominal types nominally except for unions, which are treated structurally. Give this branch a try in your codebase and let me know your impressions!
Configuration menu - View commit details
-
Copy full SHA for 58701af - Browse repository at this point
Copy the full SHA 58701afView commit details -
don't infer table literal as the first table type of a union
Now that unions may contain multiple table types, only infer a table literal into the table type of a union if there's a single table type in a union.
Configuration menu - View commit details
-
Copy full SHA for 79c9b09 - Browse repository at this point
Copy the full SHA 79c9b09View commit details -
Configuration menu - View commit details
-
Copy full SHA for c46dee5 - Browse repository at this point
Copy the full SHA c46dee5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d36733c - Browse repository at this point
Copy the full SHA d36733cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 800cc79 - Browse repository at this point
Copy the full SHA 800cc79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d11028 - Browse repository at this point
Copy the full SHA 8d11028View commit details -
__is: accept unions over multiple tables that declare
__is
metamethodAccordingly, accept `is` checks on table types that declare `__is`. We disallow unions mixing tables with and without `__is`. This is a limitation because to lift it we would have to implement code that transforms this ``` local u = R1 | R2 | {number} -- R1 and R2 have __is, {number} doesn't if u is {number} then -- ... end ``` into (effectively) ``` local u = R1 | R2 | {number} -- R1 and R2 have __is, {number} doesn't if not (u is R1 or u is R2) then -- ... end ``` In other words, "is" testing for the one table/userdata item without __is would have to be defined in terms of the negation of the disjunction of all the other cases.
Configuration menu - View commit details
-
Copy full SHA for 11acc34 - Browse repository at this point
Copy the full SHA 11acc34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7decf46 - Browse repository at this point
Copy the full SHA 7decf46View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3bf9fd - Browse repository at this point
Copy the full SHA e3bf9fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf791d1 - Browse repository at this point
Copy the full SHA bf791d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40d062 - Browse repository at this point
Copy the full SHA a40d062View commit details -
Configuration menu - View commit details
-
Copy full SHA for 621a3f0 - Browse repository at this point
Copy the full SHA 621a3f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for db02a91 - Browse repository at this point
Copy the full SHA db02a91View commit details -
interfaces: add "is <interface_list>" to record syntax
Also check that types referenced in `is` exist.
Configuration menu - View commit details
-
Copy full SHA for d34d144 - Browse repository at this point
Copy the full SHA d34d144View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b494bf - Browse repository at this point
Copy the full SHA 0b494bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f20b6e - Browse repository at this point
Copy the full SHA 8f20b6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 559d6c2 - Browse repository at this point
Copy the full SHA 559d6c2View commit details -
interfaces/records: move arrayrecord to
is {...}
This avoids a grammar ambiguity in the `where` clause, where a following `{T}` would be mistaken as being part of the `where` expression. We still support a `{T}` at the top of the record declaration if there is no `is` clause, but not in the middle of the field list anymore.
Configuration menu - View commit details
-
Copy full SHA for 9726088 - Browse repository at this point
Copy the full SHA 9726088View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27124cf - Browse repository at this point
Copy the full SHA 27124cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc937f - Browse repository at this point
Copy the full SHA bdc937fView commit details -
interfaces: prevent assignment to interfaces and types
Interfaces are abstract, so they cannot be assigned to, unlike record fields, which are concrete values when records are used as prototypes. We already prevented assignment overwriting top-level records. This commit also extends the restriction to nested records, for consistency.
Configuration menu - View commit details
-
Copy full SHA for bf75403 - Browse repository at this point
Copy the full SHA bf75403View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a5aeb4 - Browse repository at this point
Copy the full SHA 9a5aeb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f034cf1 - Browse repository at this point
Copy the full SHA f034cf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d62c0e1 - Browse repository at this point
Copy the full SHA d62c0e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 997d289 - Browse repository at this point
Copy the full SHA 997d289View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51a0be2 - Browse repository at this point
Copy the full SHA 51a0be2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44bdf19 - Browse repository at this point
Copy the full SHA 44bdf19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f3fd80 - Browse repository at this point
Copy the full SHA 7f3fd80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3583627 - Browse repository at this point
Copy the full SHA 3583627View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b25cdb - Browse repository at this point
Copy the full SHA 3b25cdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a81bd0 - Browse repository at this point
Copy the full SHA 3a81bd0View commit details -
* Node objects no longer carry a `.type` attribute. This was redundant with the return values produced by the node visitors, which are then available in the traversal as the `children` array. The idea is that the logic of resolving types should follow the single-pass flow of traversal, instead of having to track the code of visitors that peek into the tree structure (or worse, modify it after the fact as they go). * Because of that, the collection of types for `tl types` has changed: instead of always collecting a symbol table during type checking, one needs to enable `report_types = true` in the `env`, which then performs the collection and summarization of the data reported by `tl types` in place. This makes the overall process more efficient for both `tl check` and `tl types`.
Configuration menu - View commit details
-
Copy full SHA for 4896aee - Browse repository at this point
Copy the full SHA 4896aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5658b9a - Browse repository at this point
Copy the full SHA 5658b9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c54e4f5 - Browse repository at this point
Copy the full SHA c54e4f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a49055 - Browse repository at this point
Copy the full SHA 8a49055View commit details -
Configuration menu - View commit details
-
Copy full SHA for 988e45c - Browse repository at this point
Copy the full SHA 988e45cView commit details -
avoid setting (or updating!) typename directly
This is to ensure that there is always a consistent correspondence between a typeid and its typename (that is, if the typename changes, we update the typeid as well). With consistency between typeids and typenames, we would _almost_ be able to cache type comparison judgements based on typeids alone. We're not able to do it just because type comparisons such as is_a and same_type have one possible side-effect: inferring typevars. From my experiments, in the current state of the code there's no real performance gain by caching type comparisons, but it would be nice to be able to do it for better understandability -- intuitively, type comparisons should be a pure operation. In any case, the changes in this commit should make it easier to reason about and debug the code in the long term.
Configuration menu - View commit details
-
Copy full SHA for fe33c75 - Browse repository at this point
Copy the full SHA fe33c75View commit details -
Configuration menu - View commit details
-
Copy full SHA for be6a19e - Browse repository at this point
Copy the full SHA be6a19eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aaf3de - Browse repository at this point
Copy the full SHA 8aaf3deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94a8368 - Browse repository at this point
Copy the full SHA 94a8368View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5aebc64 - Browse repository at this point
Copy the full SHA 5aebc64View commit details -
Configuration menu - View commit details
-
Copy full SHA for b55294f - Browse repository at this point
Copy the full SHA b55294fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 180394b - Browse repository at this point
Copy the full SHA 180394bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80e41bd - Browse repository at this point
Copy the full SHA 80e41bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for b428197 - Browse repository at this point
Copy the full SHA b428197View commit details -
Configuration menu - View commit details
-
Copy full SHA for 660f741 - Browse repository at this point
Copy the full SHA 660f741View commit details -
abstract checks for macroexp and interfaces
Ensure is_abstract is always set for interface typetypes by using new_typetype constructor.
Configuration menu - View commit details
-
Copy full SHA for f651782 - Browse repository at this point
Copy the full SHA f651782View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3a22d8 - Browse repository at this point
Copy the full SHA e3a22d8View commit details -
refactor: reduce confusion in Type instances
* `Type` is no longer a `{Type}` - this was being used only for "tuple" types; now those have an explicit `.tuple` attribute. * Split `Node`'s `.decltype` into three different attributes: `.argtype` for "argument", `.itemtype` for "table_item" and `.decltuple` for variable lists. * Add `TupleType` alias; this is not enforced as a subtype at this point. It is only being used for documentation. * Type object constructors such as `a_function` are now stricter about expecting "tuple" entries. This caught a few mistakes. * More consistent tuple usage: function calls always return a "tuple" or an "invalid". Arguments and expected returns are always passed in as a "tuple". Special function handlers are adjusted accordingly. * Explicit assignments of `.y` and `.x` are replaced by `type_at` wrapper, which uses a `Where`.
Configuration menu - View commit details
-
Copy full SHA for 2780503 - Browse repository at this point
Copy the full SHA 2780503View commit details -
Configuration menu - View commit details
-
Copy full SHA for 305ef38 - Browse repository at this point
Copy the full SHA 305ef38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f8311c - Browse repository at this point
Copy the full SHA 0f8311cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9117f0 - Browse repository at this point
Copy the full SHA d9117f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for da234d5 - Browse repository at this point
Copy the full SHA da234d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7ac7de - Browse repository at this point
Copy the full SHA f7ac7deView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5ea5e5 - Browse repository at this point
Copy the full SHA f5ea5e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 179e669 - Browse repository at this point
Copy the full SHA 179e669View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e99670 - Browse repository at this point
Copy the full SHA 9e99670View commit details -
Configuration menu - View commit details
-
Copy full SHA for a357282 - Browse repository at this point
Copy the full SHA a357282View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dbdefa - Browse repository at this point
Copy the full SHA 2dbdefaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c0f475 - Browse repository at this point
Copy the full SHA 5c0f475View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d9434a - Browse repository at this point
Copy the full SHA 7d9434aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69a5393 - Browse repository at this point
Copy the full SHA 69a5393View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0ad383 - Browse repository at this point
Copy the full SHA f0ad383View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45d20e9 - Browse repository at this point
Copy the full SHA 45d20e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fbb2d7 - Browse repository at this point
Copy the full SHA 0fbb2d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0428560 - Browse repository at this point
Copy the full SHA 0428560View commit details -
Configuration menu - View commit details
-
Copy full SHA for 318c7b7 - Browse repository at this point
Copy the full SHA 318c7b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30650c3 - Browse repository at this point
Copy the full SHA 30650c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6534e5 - Browse repository at this point
Copy the full SHA b6534e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36e8ea3 - Browse repository at this point
Copy the full SHA 36e8ea3View commit details -
Configuration menu - View commit details
-
Copy full SHA for c54a112 - Browse repository at this point
Copy the full SHA c54a112View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0954829 - Browse repository at this point
Copy the full SHA 0954829View commit details -
The implementation of the <total> attribute remains messy, but at least this restrict the is_total field to actual records and maps (and not nominals). The <total> feature for records should go away once we have nilable/non-nilable fields.
Configuration menu - View commit details
-
Copy full SHA for af519c6 - Browse repository at this point
Copy the full SHA af519c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5768abf - Browse repository at this point
Copy the full SHA 5768abfView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd02195 - Browse repository at this point
Copy the full SHA fd02195View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc9c029 - Browse repository at this point
Copy the full SHA cc9c029View commit details -
refactor: declname and is_alias_node
Rename non-nominal-type use of names to declname, and rename Node.is_alias to Node.is_alias_node
Configuration menu - View commit details
-
Copy full SHA for f556501 - Browse repository at this point
Copy the full SHA f556501View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9845b79 - Browse repository at this point
Copy the full SHA 9845b79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19a3a04 - Browse repository at this point
Copy the full SHA 19a3a04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30739c3 - Browse repository at this point
Copy the full SHA 30739c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94059b9 - Browse repository at this point
Copy the full SHA 94059b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 476573b - Browse repository at this point
Copy the full SHA 476573bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25e667e - Browse repository at this point
Copy the full SHA 25e667eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0938c21 - Browse repository at this point
Copy the full SHA 0938c21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4293ee1 - Browse repository at this point
Copy the full SHA 4293ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7031282 - Browse repository at this point
Copy the full SHA 7031282View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69f7a4b - Browse repository at this point
Copy the full SHA 69f7a4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55be243 - Browse repository at this point
Copy the full SHA 55be243View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2fe2c9 - Browse repository at this point
Copy the full SHA b2fe2c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd7538f - Browse repository at this point
Copy the full SHA fd7538fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20fa3d8 - Browse repository at this point
Copy the full SHA 20fa3d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59e5fe1 - Browse repository at this point
Copy the full SHA 59e5fe1View commit details -
language flag: feat-arity=on/off
Enable or disable the behavior of '?' argument annotations, providing backwards compatibility with existing codebases.
Configuration menu - View commit details
-
Copy full SHA for 94cf23c - Browse repository at this point
Copy the full SHA 94cf23cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5e1415 - Browse repository at this point
Copy the full SHA a5e1415View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f8408e - Browse repository at this point
Copy the full SHA 8f8408eView commit details -
Makefile: allow testing with different interpreter values
This will allow me to more easily run local tests with my hacked `lua-no-tailcalls` interpreter binary.
Configuration menu - View commit details
-
Copy full SHA for 93126f4 - Browse repository at this point
Copy the full SHA 93126f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for aed4035 - Browse repository at this point
Copy the full SHA aed4035View commit details -
Configuration menu - View commit details
-
Copy full SHA for c17be97 - Browse repository at this point
Copy the full SHA c17be97View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7a1966 - Browse repository at this point
Copy the full SHA e7a1966View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea7d841 - Browse repository at this point
Copy the full SHA ea7d841View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbbb8f1 - Browse repository at this point
Copy the full SHA cbbb8f1View commit details -
refactor: use to_structural to resolve nominals
...instead of the overkill of resolve_tuple_and_nominal everywhere. Only resolve tuples where needed (and we're still possibly overdoing it.)
Configuration menu - View commit details
-
Copy full SHA for d79e47f - Browse repository at this point
Copy the full SHA d79e47fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4487f80 - Browse repository at this point
Copy the full SHA 4487f80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84c5b8d - Browse repository at this point
Copy the full SHA 84c5b8dView commit details -
more integer in stdlib signatures
Co-Authored-By: Hisham Muhammad <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 867a659 - Browse repository at this point
Copy the full SHA 867a659View commit details -
Configuration menu - View commit details
-
Copy full SHA for 123635b - Browse repository at this point
Copy the full SHA 123635bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25f64b5 - Browse repository at this point
Copy the full SHA 25f64b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ecb0bc - Browse repository at this point
Copy the full SHA 7ecb0bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 946f2b7 - Browse repository at this point
Copy the full SHA 946f2b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 775cc2a - Browse repository at this point
Copy the full SHA 775cc2aView commit details -
unite: removing duplicates via t.found should be enough
This avoids resolve_nominal which needs state lookup. With this change, unite() should work looking at the given Type objects only.
Configuration menu - View commit details
-
Copy full SHA for bba12c4 - Browse repository at this point
Copy the full SHA bba12c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2dc259 - Browse repository at this point
Copy the full SHA c2dc259View commit details -
move module_name logic out of type_check
it is now handled by the parts that deal with module names: `require` and the package loader.
Configuration menu - View commit details
-
Copy full SHA for 5a6fb5f - Browse repository at this point
Copy the full SHA 5a6fb5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52aa5f6 - Browse repository at this point
Copy the full SHA 52aa5f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8793fe5 - Browse repository at this point
Copy the full SHA 8793fe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6b0302 - Browse repository at this point
Copy the full SHA c6b0302View commit details -
big code reorganization: TypeChecker record
Several big changes, that were done in tandem, and which would be too troublesome to break into separate commits. The goal here is to ultimately be able to break tl.tl into multiple files (because its size started hitting limits in both Lua 5.1 (number of upvalues) and Lua 5.4 (number of locals). Here's a high-level summary of the changes: * new Errors record, encapsulating error-reporting concerns; * all Type occurrences have unique objects reporting their locations (no more singletons for base types such as BOOLEAN and INVALID); * some enums renamed for more consistency across Gen and Feat options; * TypeCheckOptions and EnvOptions tables reorganized for easier forwarding of options across them; * simplifications in the various function signatures of the public API; * all Types and Nodes store filename, line and column location (`f`, `y`, `x`); * Scope is now a record containing the variables map and unresolved items -- no more "@unresolved" pseudo-variable and `unresolved` pseudo-type for storing this data in the symbols table; * `type_check` now uses a TypeChecker object for storing all state, instead of relying on closures and function nesting (that's a bit sad is it ended up spreading `self:` and extra function arguments everywhere, but I guess state management will be more explicit for others reading the code now...); * all Fact objects have a Where location as well, and supressions of inference data in error messages for widened-back types is marked explicitly with `no_infer` instead of missing a `w` field; * general simplification of the sourcing of error locations (though I would still like to improve that further);
Configuration menu - View commit details
-
Copy full SHA for 0d3c682 - Browse repository at this point
Copy the full SHA 0d3c682View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ead134 - Browse repository at this point
Copy the full SHA 4ead134View commit details -
fix: lax arity of returns in function literals
The unwanted difference between the types for `f` and `g` in the regression test from this commit was observed when fixing the issue #736.
Configuration menu - View commit details
-
Copy full SHA for 30515ef - Browse repository at this point
Copy the full SHA 30515efView commit details -
fix: let lax mode perform emptytable key-value inference as normal
Do not over-constrain types with `unknown`, let `assert_is_a` perform the check when t2 is `unresolved_emptytable_value`.
Configuration menu - View commit details
-
Copy full SHA for 9701800 - Browse repository at this point
Copy the full SHA 9701800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 705b61e - Browse repository at this point
Copy the full SHA 705b61eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fb26dc - Browse repository at this point
Copy the full SHA 3fb26dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bb3716 - Browse repository at this point
Copy the full SHA 5bb3716View commit details -
Configuration menu - View commit details
-
Copy full SHA for 823a893 - Browse repository at this point
Copy the full SHA 823a893View commit details -
Accept __lt and __le for > and >= operators.
As in Lua, "A comparison a > b is translated to b < a and a >= b is translated to b <= a."
Configuration menu - View commit details
-
Copy full SHA for da75aa2 - Browse repository at this point
Copy the full SHA da75aa2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73f104f - Browse repository at this point
Copy the full SHA 73f104fView commit details -
fix: do not crash when comparing type defined with 'function'
Using the plain 'function' type needs to define 'min_arity'.
Configuration menu - View commit details
-
Copy full SHA for 90f2a1e - Browse repository at this point
Copy the full SHA 90f2a1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d6b589 - Browse repository at this point
Copy the full SHA 8d6b589View commit details -
Configuration menu - View commit details
-
Copy full SHA for e85ac75 - Browse repository at this point
Copy the full SHA e85ac75View commit details -
add the code output to the io.open function (#769)
Updated definition for io.open function to expose the 3rd parameter containing the returning code as integer * Add the code output to the io.open function * generate the tl.lua
Configuration menu - View commit details
-
Copy full SHA for 15c1bff - Browse repository at this point
Copy the full SHA 15c1bffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9326efd - Browse repository at this point
Copy the full SHA 9326efdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d121f2e - Browse repository at this point
Copy the full SHA d121f2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 222b8c1 - Browse repository at this point
Copy the full SHA 222b8c1View commit details -
tests: add regression test to function call check crash
Add another regression test to a bug fixed in f97625d Co-Authored-By: Victor Ilchev <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a1dcf79 - Browse repository at this point
Copy the full SHA a1dcf79View commit details -
standard library: special-case tuple support for table.unpack
Add special cases for tuples of sizes up to 5.
Configuration menu - View commit details
-
Copy full SHA for 3995c24 - Browse repository at this point
Copy the full SHA 3995c24View commit details -
Co-authored-by: Darren Jennings <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 91afcc8 - Browse repository at this point
Copy the full SHA 91afcc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0856b5 - Browse repository at this point
Copy the full SHA d0856b5View commit details -
local type require() accepts dot notation for nested record
`local type MyType = require("module").MyType` is now valid. Closes #778.
Configuration menu - View commit details
-
Copy full SHA for 5f85333 - Browse repository at this point
Copy the full SHA 5f85333View commit details -
fix: delay resolution of type arguments
Ideally we need to recurse type arguments and propagate those. But since they are arriving in typevar_resolver as nominal, we're just renaming the existing typeargs (see `HACK` in source), and test cases. This is most likely wrong, hope it doesn't break anything else! Closes #777.
Configuration menu - View commit details
-
Copy full SHA for 448fe84 - Browse repository at this point
Copy the full SHA 448fe84View commit details -
stricter checks for shadowing of type arguments
Produces an error when using a base type as a type argument, and a warning when using another variable name. We can be stricter with type arguments because those exist only in Teal's type world. We can't be as strict with redeclarations in general because record types also exist as concrete Lua objects (example: the "string" table in the standard library). Fixes #764.
Configuration menu - View commit details
-
Copy full SHA for 9736418 - Browse repository at this point
Copy the full SHA 9736418View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49c2f4e - Browse repository at this point
Copy the full SHA 49c2f4eView commit details -
fix: localizing a record does not make the new local a type
This allows for a pattern where we can localize a record and load and alternative implementation on top of it. Fixes #759.
Configuration menu - View commit details
-
Copy full SHA for ccb5081 - Browse repository at this point
Copy the full SHA ccb5081View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ae8974 - Browse repository at this point
Copy the full SHA 7ae8974View commit details -
Configuration menu - View commit details
-
Copy full SHA for 877e785 - Browse repository at this point
Copy the full SHA 877e785View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71cc244 - Browse repository at this point
Copy the full SHA 71cc244View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93c83ba - Browse repository at this point
Copy the full SHA 93c83baView commit details -
This makes me think if this should happen implicitly...
Configuration menu - View commit details
-
Copy full SHA for 1d2dffd - Browse repository at this point
Copy the full SHA 1d2dffdView commit details -
This triggered during debugging because show_type for two string with the same typeid didn't match.
Configuration menu - View commit details
-
Copy full SHA for 06d6778 - Browse repository at this point
Copy the full SHA 06d6778View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b0fe09 - Browse repository at this point
Copy the full SHA 8b0fe09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cbedd2 - Browse repository at this point
Copy the full SHA 7cbedd2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0478bd4 - Browse repository at this point
Copy the full SHA 0478bd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8d5665 - Browse repository at this point
Copy the full SHA f8d5665View commit details -
Configuration menu - View commit details
-
Copy full SHA for bbe6c07 - Browse repository at this point
Copy the full SHA bbe6c07View commit details -
Configuration menu - View commit details
-
Copy full SHA for a12249f - Browse repository at this point
Copy the full SHA a12249fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f84fede - Browse repository at this point
Copy the full SHA f84fedeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a829b0 - Browse repository at this point
Copy the full SHA 4a829b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6d5d7b - Browse repository at this point
Copy the full SHA b6d5d7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30e603a - Browse repository at this point
Copy the full SHA 30e603aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b27f3e - Browse repository at this point
Copy the full SHA 1b27f3eView commit details -
fix: self heuristic: ensure that non-nominal types are detected
The heuristic was only comparing against nominal types; if a non-nominal type such as `(self: integer)` was used, it was silently accepted as a method and promoted to the `self` type.
Configuration menu - View commit details
-
Copy full SHA for 333b9e8 - Browse repository at this point
Copy the full SHA 333b9e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4a780f - Browse repository at this point
Copy the full SHA a4a780fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c2d4c6 - Browse repository at this point
Copy the full SHA 8c2d4c6View commit details -
tests: add regression test for #752.
Thanks @svermeulen for the report!
Configuration menu - View commit details
-
Copy full SHA for ee5c8fc - Browse repository at this point
Copy the full SHA ee5c8fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ff0df4 - Browse repository at this point
Copy the full SHA 2ff0df4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6430aaa - Browse repository at this point
Copy the full SHA 6430aaaView commit details -
fix: tl types: never trigger ICE on bad files
This matches the behavior of master. Can't make a simple regression test for this one because that would be dependent on unspecified behaviors of the parser and type-checker. Fixes #795.
Configuration menu - View commit details
-
Copy full SHA for 234ee2a - Browse repository at this point
Copy the full SHA 234ee2aView commit details -
fix: do not infer type variables as boolean in boolean contexts
Introduces a special internal type, to be used only as the node.expected type in boolean contexts such as `if _ then`. It behaves exactly like boolean except that type variables do not infer to it. See #768.
Configuration menu - View commit details
-
Copy full SHA for d12f534 - Browse repository at this point
Copy the full SHA d12f534View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8b5bb8 - Browse repository at this point
Copy the full SHA b8b5bb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6a19f - Browse repository at this point
Copy the full SHA 7a6a19fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b12d76 - Browse repository at this point
Copy the full SHA 1b12d76View commit details
Commits on Sep 2, 2024
-
Proofreading by Thijs Schreijer Co-authored-by: Thijs Schreijer <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e5ee053 - Browse repository at this point
Copy the full SHA e5ee053View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6719333 - Browse repository at this point
Copy the full SHA 6719333View commit details -
Configuration menu - View commit details
-
Copy full SHA for a84ac18 - Browse repository at this point
Copy the full SHA a84ac18View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc15bc4 - Browse repository at this point
Copy the full SHA dc15bc4View commit details -
optional arity: lax arg check in functions with feat-arity off
This might be too lax, but it does revert back to accepting assignments that were valid in Teal 0.15.
Configuration menu - View commit details
-
Copy full SHA for 1dd8f9e - Browse repository at this point
Copy the full SHA 1dd8f9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e49ac8b - Browse repository at this point
Copy the full SHA e49ac8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d04fa0f - Browse repository at this point
Copy the full SHA d04fa0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cc78b6 - Browse repository at this point
Copy the full SHA 3cc78b6View commit details
Commits on Sep 3, 2024
-
metatables: check metamethod types in metatable definition
Add special-case behavior to specialize a type `metatable<R>` using the definition of `metamethod` entries from `R` (and not just a type-variable application of `R` into the definition of `global record metatable<T>` from the standard library definition. See tests in spec/declaration/metatable_spec.lua for examples of the added checks. Fixes #633. (At least the extent of it that can be resolved at this time, without explicit `nil` support -- a good explanation as to why the second case isn't resolved is given by @bjornbm in #633 (comment) : "the record definition defines what keys/values are valid, but not that they are defined (or more generally perhaps the values may be nil, since nil is a valid value of every type). What is checked is that values for the defined keys have the right type, and that no other keys are added to the record.
Configuration menu - View commit details
-
Copy full SHA for fcdd861 - Browse repository at this point
Copy the full SHA fcdd861View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe86b72 - Browse repository at this point
Copy the full SHA fe86b72View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed93fb3 - Browse repository at this point
Copy the full SHA ed93fb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86b01a7 - Browse repository at this point
Copy the full SHA 86b01a7View commit details
Commits on Sep 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6861032 - Browse repository at this point
Copy the full SHA 6861032View commit details -
Configuration menu - View commit details
-
Copy full SHA for 311fcd1 - Browse repository at this point
Copy the full SHA 311fcd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d6d5d4 - Browse repository at this point
Copy the full SHA 6d6d5d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5a1d51 - Browse repository at this point
Copy the full SHA f5a1d51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73faece - Browse repository at this point
Copy the full SHA 73faeceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a89cf0 - Browse repository at this point
Copy the full SHA 9a89cf0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98044e3 - Browse repository at this point
Copy the full SHA 98044e3View commit details -
refactor: remove TypeAliasType (unify with TypeDeclType)
The TypeAliasType is now a case of TypeDeclType, where `is_alias` is true, and `def` is always a NominalType (asserts are sprinkled in the code to check this).
Configuration menu - View commit details
-
Copy full SHA for 8f89ec7 - Browse repository at this point
Copy the full SHA 8f89ec7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64de559 - Browse repository at this point
Copy the full SHA 64de559View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65a904e - Browse repository at this point
Copy the full SHA 65a904eView commit details
Commits on Sep 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 775ceda - Browse repository at this point
Copy the full SHA 775cedaView commit details
Commits on Sep 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ae05702 - Browse repository at this point
Copy the full SHA ae05702View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34193b7 - Browse repository at this point
Copy the full SHA 34193b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96baa3d - Browse repository at this point
Copy the full SHA 96baa3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcaac58 - Browse repository at this point
Copy the full SHA bcaac58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 033681e - Browse repository at this point
Copy the full SHA 033681eView commit details
Commits on Sep 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 373e06d - Browse repository at this point
Copy the full SHA 373e06dView commit details
Commits on Sep 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b783313 - Browse repository at this point
Copy the full SHA b783313View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb33692 - Browse repository at this point
Copy the full SHA cb33692View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a117b9 - Browse repository at this point
Copy the full SHA 7a117b9View commit details
Commits on Sep 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f157d84 - Browse repository at this point
Copy the full SHA f157d84View commit details -
tests: add #cli tag in spec/cli tests
This makes it easy to skip those tests when a faster busted run is desired in exchange of completeness.
Configuration menu - View commit details
-
Copy full SHA for 9e7c645 - Browse repository at this point
Copy the full SHA 9e7c645View commit details -
Configuration menu - View commit details
-
Copy full SHA for ece9e50 - Browse repository at this point
Copy the full SHA ece9e50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c3ba3d - Browse repository at this point
Copy the full SHA 1c3ba3dView commit details
Commits on Sep 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8f63a86 - Browse repository at this point
Copy the full SHA 8f63a86View commit details -
fix: do not infer typevars on failed poly match
In `assert(f:read("a"))`, the return type of the failed poly match of `file:read` was matching the `A` typevar of `assert`. We now reset the temporary scope of a call typecheck fully when backtracking to test different poly entries (previously we were backtracking only the poly's own typeargs).
Configuration menu - View commit details
-
Copy full SHA for f0d714e - Browse repository at this point
Copy the full SHA f0d714eView commit details -
string.gsub: accept functions with no returns
Note that we're doing a little hack here, but notating the return type as vararg, as a stand-in for something like a `?` in the return type. I guess we need `min_arity` calculations in the return types as well. Also fix the declaration of `gsub` because Lua does not accept functions that return booleans, but it does accept numbers.
Configuration menu - View commit details
-
Copy full SHA for cfc986c - Browse repository at this point
Copy the full SHA cfc986cView commit details -
improve inference of nested emptytables
See #732 (comment) > There is one remaining tricky error triggering in the day12 for which I > already found a workaround (but which would merit a nicer solution since this > uncovered the fact that my empty-table inference does not backpropagate > correctly in the case of map[c1][c2] = true). I'll try to code a solution > quickly, otherwise I'll document the edge case in the testsuite and go with > the workaround. This is the workaround, and the documentation of the edge case is in the test case included in this commit.
Configuration menu - View commit details
-
Copy full SHA for ccd2417 - Browse repository at this point
Copy the full SHA ccd2417View commit details
Commits on Sep 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 58ebd4b - Browse repository at this point
Copy the full SHA 58ebd4bView commit details -
fix: can assign an emptytable to an emptytable
This should also avoid inferring types as `{} | {}`.
Configuration menu - View commit details
-
Copy full SHA for af5aed5 - Browse repository at this point
Copy the full SHA af5aed5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8965fa - Browse repository at this point
Copy the full SHA d8965faView commit details -
Configuration menu - View commit details
-
Copy full SHA for b618edb - Browse repository at this point
Copy the full SHA b618edbView commit details
Commits on Sep 21, 2024
-
types: reports record functions in record field list
Also, strip typedecls from type report, and represent records in the "str" field by their declared name. Thanks @pdesaulniers for the report!
Configuration menu - View commit details
-
Copy full SHA for 6117c8c - Browse repository at this point
Copy the full SHA 6117c8cView commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 78c08f9 - Browse repository at this point
Copy the full SHA 78c08f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74a44d3 - Browse repository at this point
Copy the full SHA 74a44d3View commit details
Commits on Oct 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d05df56 - Browse repository at this point
Copy the full SHA d05df56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 737a987 - Browse repository at this point
Copy the full SHA 737a987View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab9bf51 - Browse repository at this point
Copy the full SHA ab9bf51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c5219f - Browse repository at this point
Copy the full SHA 2c5219fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fa35a4 - Browse repository at this point
Copy the full SHA 4fa35a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e289caf - Browse repository at this point
Copy the full SHA e289cafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 261dacd - Browse repository at this point
Copy the full SHA 261dacdView commit details