mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-02 01:40:54 +01:00
Another week, another release. Happy spring! 🌷 ## New Type Solver - Add typechecking and autocomplete support for user-defined type functions! - Improve the display of type paths, making type mismatch errors far more human-readable. - Enhance various aspects of the `index` type function: support function type metamethods, fix crashes involving cyclic metatables, and forward `any` types through the type function. - Fix incorrect subtyping results involving the `buffer` type. - Fix crashes related to typechecking anonymous functions in nonstrict mode. ## AST - Retain source information for type packs, functions, and type functions. - Introduce `AstTypeOptional` to differentiate `T?` from `T | nil` in the AST. - Prevent the transpiler from advancing before tokens when the AST has errors. ## Autocomplete - Introduce demand-based cloning and better module isolation for fragment autocomplete, leading to a substantial speedup in performance. - Guard against recursive unions in `autocompleteProps`. ## Miscellaneous - #1720 (thank you!) ## Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Talha Pathan <tpathan@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
20 lines
486 B
C++
20 lines
486 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include "Luau/Scope.h"
|
|
#include "Luau/NotNull.h"
|
|
#include "Luau/TypeFwd.h"
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
std::optional<TypeId> generalize(
|
|
NotNull<TypeArena> arena,
|
|
NotNull<BuiltinTypes> builtinTypes,
|
|
NotNull<Scope> scope,
|
|
NotNull<DenseHashSet<TypeId>> cachedTypes,
|
|
TypeId ty,
|
|
/* avoid sealing tables*/ bool avoidSealingTables = false
|
|
);
|
|
|
|
}
|