mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
* Fix a bug where reading a property from an unsealed table caused inference to improperly infer the existence of that property. * Fix #827 We have also made a lot of progress on the new solver and the JIT. Both projects are still in the process of being built out. Neither are ready for general use yet. We are mostly working to tighten up how the new solver handles refinements and updates to unsealed tables to bring it up to the same level as the old solver. --------- Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
37 lines
1 KiB
C++
37 lines
1 KiB
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#include "Luau/Refinement.h"
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
RefinementId RefinementArena::negation(RefinementId refinement)
|
|
{
|
|
return NotNull{allocator.allocate(Negation{refinement})};
|
|
}
|
|
|
|
RefinementId RefinementArena::conjunction(RefinementId lhs, RefinementId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Conjunction{lhs, rhs})};
|
|
}
|
|
|
|
RefinementId RefinementArena::disjunction(RefinementId lhs, RefinementId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Disjunction{lhs, rhs})};
|
|
}
|
|
|
|
RefinementId RefinementArena::equivalence(RefinementId lhs, RefinementId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Equivalence{lhs, rhs})};
|
|
}
|
|
|
|
RefinementId RefinementArena::proposition(DefId def, TypeId discriminantTy)
|
|
{
|
|
return NotNull{allocator.allocate(Proposition{def, discriminantTy})};
|
|
}
|
|
|
|
RefinementId RefinementArena::variadic(const std::vector<RefinementId>& refis)
|
|
{
|
|
return NotNull{allocator.allocate(Variadic{refis})};
|
|
}
|
|
|
|
} // namespace Luau
|