mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
- Type mismatch errors now show detailed information for compound types, highlighting the mismatching component - Fix string.pack bug on ARM when packing negative numbers using unsigned formats - Implement bit32.countlz/countrz (RFC RFC: bit32.countlz/countrz #89) - Minor compiler throughput optimization (~2% faster compilation) - Improve transpiler behavior for edge cases and better test coverage (not exposed through CLI at the moment) - Improve error recovery when parsing invalid assignments - Build fixes for fuzzing targets
57 lines
949 B
C++
57 lines
949 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#include "Luau/Unifiable.h"
|
|
|
|
namespace Luau
|
|
{
|
|
namespace Unifiable
|
|
{
|
|
|
|
Free::Free(TypeLevel level)
|
|
: index(++nextIndex)
|
|
, level(level)
|
|
{
|
|
}
|
|
|
|
int Free::nextIndex = 0;
|
|
|
|
Generic::Generic()
|
|
: index(++nextIndex)
|
|
, name("g" + std::to_string(index))
|
|
, explicitName(false)
|
|
{
|
|
}
|
|
|
|
Generic::Generic(TypeLevel level)
|
|
: index(++nextIndex)
|
|
, level(level)
|
|
, name("g" + std::to_string(index))
|
|
, explicitName(false)
|
|
{
|
|
}
|
|
|
|
Generic::Generic(const Name& name)
|
|
: index(++nextIndex)
|
|
, name(name)
|
|
, explicitName(true)
|
|
{
|
|
}
|
|
|
|
Generic::Generic(TypeLevel level, const Name& name)
|
|
: index(++nextIndex)
|
|
, level(level)
|
|
, name(name)
|
|
, explicitName(true)
|
|
{
|
|
}
|
|
|
|
int Generic::nextIndex = 0;
|
|
|
|
Error::Error()
|
|
: index(++nextIndex)
|
|
{
|
|
}
|
|
|
|
int Error::nextIndex = 0;
|
|
|
|
} // namespace Unifiable
|
|
} // namespace Luau
|