mirror of
https://github.com/luau-lang/luau.git
synced 2025-08-26 11:27:08 +01:00
## What's Changed? This week we have an update with an implementation for one of the RFCs we had approved before, an improvement of the new type solver and a small Lua 5.1 C API compatibility improvement. * `@deprecated` attribute can now have a custom suggestion for a replacement and a reason message as described in [deprecated attribute parameters RFC](https://rfcs.luau.org/syntax-attribute-functions-deprecated.html) For example: ```luau @[deprecated {reason = "foo suffers from performance issues", use = "bar"}] local function foo() ... end -- Function 'foo' is deprecated, use 'bar' instead. foo suffers from performance issues foo() ``` * `lua_cpcall` C API function has been restored both for compatibility with Lua 5.1 and as a safe way to enter protected call environment to work with Luau C API functions that may error Instead of ``` if (!lua_checkstack(L, 2)) return -1; lua_pushcfunction(L, test, nullptr); lua_pushlightuserdata(L, context); int status = lua_pcall(L, 1, 0, 0); ``` you can simply do ``` int status = lua_cpcall(L, test, context); ``` * In Luau CLI, required module return values can now have any type ## New Type Solver - Additional improvements on type refinements used with external types should fix some reported false positive errors where types refined to `never` - Fixed an issue in recursive refinement types in a form of `t1 where t1 = refine<t1, _>` getting 'stuck' - Fixed an issue in subtyping of generic functions, it is now possible to assign `<T>(T, (T) -> T) -> T` to `(number, <X>(X) -> X) -> number` - Fixed an ICE caused by recursive types (Fixes #1686) - Added additional iteration and recursion limits to stop the type solver before system resources are used up ## Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@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 | ||
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 | ||
InferPolarity.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 |