luau/Analysis/src/Def.cpp
vegorov-rbx 59ae47db43
Sync to upstream/release/555 (#768)
* Type mismatch errors now mention if unification failed in covariant or
invariant context, to explain why sometimes derived class can't be
converted to base class or why `T` can't be converted into `T?` and so
on
* Class type indexing is no longer an error in non-strict mode (still an
error in strict mode)
* Fixed cyclic type packs not being displayed in the type
* Added an error when unrelated types are compared with `==`/`~=`
* Fixed false positive errors involving sub-type tests an `never` type
* Fixed miscompilation of multiple assignment statements (Fixes
https://github.com/Roblox/luau/issues/754)
* Type inference stability improvements
2022-12-02 10:09:59 -08:00

17 lines
436 B
C++

// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#include "Luau/Def.h"
namespace Luau
{
DefId DefArena::freshCell()
{
return NotNull{allocator.allocate<Def>(Def{Cell{std::nullopt}})};
}
DefId DefArena::freshCell(DefId parent, const std::string& prop)
{
return NotNull{allocator.allocate<Def>(Def{Cell{FieldMetadata{parent, prop}}})};
}
} // namespace Luau