mirror of
https://github.com/luau-lang/luau.git
synced 2025-03-31 08:50:54 +01:00
After a very auspicious release last week, we have a new bevy of changes for you! ## What's Changed ### Deprecated Attribute This release includes an implementation of the `@deprecated` attribute proposed in [this RFC](https://rfcs.luau.org/syntax-attribute-functions-deprecated.html). It relies on the new type solver to propagate deprecation information from function and method AST nodes to the corresponding type objects. These objects are queried by a linter pass when it encounters local, global, or indexed variables, to issue deprecation warnings. Uses of deprecated functions and methods in recursion are ignored. To support deprecation of class methods, the parser has been extended to allow attribute declarations on class methods. The implementation does not support parameters, so it is not currently possible for users to customize deprecation messages. ### General - Add a limit for normalization of function types. ### New Type Solver - Fix type checker to accept numbers as concat operands (Fixes #1671). - Fix user-defined type functions failing when used inside type aliases/nested calls (Fixes #1738, Fixes #1679). - Improve constraint generation for overloaded functions (in part thanks to @vvatheus in #1694). - Improve type inference for indexers on table literals, especially when passing table literals directly as a function call argument. - Equate regular error type and intersection with a negation of an error type. - Avoid swapping types in 2-part union when RHS is optional. - Use simplification when doing `~nil` refinements. - `len<>` now works on metatables without `__len` function. ### AST - Retain source information for `AstTypeUnion` and `AstTypeIntersection`. ### Transpiler - Print attributes on functions. ### Parser - Allow types in indexers to begin with string literals by @jackdotink in #1750. ### Autocomplete - Evaluate user-defined type functions in ill-formed source code to provide autocomplete. - Fix the start location of functions that have attributes. - Implement better fragment selection. ### Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Talha Pathan <tpathan@roblox.com> Co-authored-by: Varun Saini <vsaini@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> **Full Changelog**: https://github.com/luau-lang/luau/compare/0.666...0.667 --------- Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Menarul Alam <malam@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Vighnesh <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> |
||
---|---|---|
.. | ||
conformance | ||
require | ||
AssemblyBuilderA64.test.cpp | ||
AssemblyBuilderX64.test.cpp | ||
AstJsonEncoder.test.cpp | ||
AstQuery.test.cpp | ||
AstQueryDsl.cpp | ||
AstQueryDsl.h | ||
AstVisitor.test.cpp | ||
Autocomplete.test.cpp | ||
BuiltinDefinitions.test.cpp | ||
ClassFixture.cpp | ||
ClassFixture.h | ||
CodeAllocator.test.cpp | ||
Compiler.test.cpp | ||
Config.test.cpp | ||
Conformance.test.cpp | ||
ConformanceIrHooks.h | ||
ConstraintGeneratorFixture.cpp | ||
ConstraintGeneratorFixture.h | ||
ConstraintSolver.test.cpp | ||
CostModel.test.cpp | ||
DataFlowGraph.test.cpp | ||
DenseHash.test.cpp | ||
DiffAsserts.cpp | ||
DiffAsserts.h | ||
Differ.test.cpp | ||
EqSat.language.test.cpp | ||
EqSat.propositional.test.cpp | ||
EqSat.slice.test.cpp | ||
EqSatSimplification.test.cpp | ||
Error.test.cpp | ||
Fixture.cpp | ||
Fixture.h | ||
FragmentAutocomplete.test.cpp | ||
Frontend.test.cpp | ||
Generalization.test.cpp | ||
InsertionOrderedMap.test.cpp | ||
Instantiation2.test.cpp | ||
IostreamOptional.h | ||
IrBuilder.test.cpp | ||
IrCallWrapperX64.test.cpp | ||
IrLowering.test.cpp | ||
IrRegAllocX64.test.cpp | ||
JsonEmitter.test.cpp | ||
Lexer.test.cpp | ||
Linter.test.cpp | ||
LValue.test.cpp | ||
main.cpp | ||
Module.test.cpp | ||
NonstrictMode.test.cpp | ||
NonStrictTypeChecker.test.cpp | ||
Normalize.test.cpp | ||
NotNull.test.cpp | ||
Parser.test.cpp | ||
RegisterCallbacks.cpp | ||
RegisterCallbacks.h | ||
Repl.test.cpp | ||
RequireByString.test.cpp | ||
RequireTracer.test.cpp | ||
RuntimeLimits.test.cpp | ||
ScopedFlags.h | ||
Set.test.cpp | ||
SharedCodeAllocator.test.cpp | ||
Simplify.test.cpp | ||
StringUtils.test.cpp | ||
Subtyping.test.cpp | ||
Symbol.test.cpp | ||
ToDot.test.cpp | ||
TopoSort.test.cpp | ||
ToString.test.cpp | ||
Transpiler.test.cpp | ||
TxnLog.test.cpp | ||
TypeFunction.test.cpp | ||
TypeFunction.user.test.cpp | ||
TypeInfer.aliases.test.cpp | ||
TypeInfer.annotations.test.cpp | ||
TypeInfer.anyerror.test.cpp | ||
TypeInfer.builtins.test.cpp | ||
TypeInfer.cfa.test.cpp | ||
TypeInfer.classes.test.cpp | ||
TypeInfer.definitions.test.cpp | ||
TypeInfer.functions.test.cpp | ||
TypeInfer.generics.test.cpp | ||
TypeInfer.intersectionTypes.test.cpp | ||
TypeInfer.loops.test.cpp | ||
TypeInfer.modules.test.cpp | ||
TypeInfer.negations.test.cpp | ||
TypeInfer.oop.test.cpp | ||
TypeInfer.operators.test.cpp | ||
TypeInfer.primitives.test.cpp | ||
TypeInfer.provisional.test.cpp | ||
TypeInfer.refinements.test.cpp | ||
TypeInfer.singletons.test.cpp | ||
TypeInfer.tables.test.cpp | ||
TypeInfer.test.cpp | ||
TypeInfer.tryUnify.test.cpp | ||
TypeInfer.typePacks.test.cpp | ||
TypeInfer.typestates.test.cpp | ||
TypeInfer.unionTypes.test.cpp | ||
TypeInfer.unknownnever.test.cpp | ||
TypePack.test.cpp | ||
TypePath.test.cpp | ||
TypeVar.test.cpp | ||
Unifier2.test.cpp | ||
Variant.test.cpp | ||
VecDeque.test.cpp | ||
VisitType.test.cpp |