2021-10-29 21:25:12 +01:00
|
|
|
// 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)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-06-03 21:32:20 +01:00
|
|
|
Free::Free(Scope2* scope)
|
|
|
|
: scope(scope)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-10-29 21:25:12 +01:00
|
|
|
int Free::nextIndex = 0;
|
|
|
|
|
|
|
|
Generic::Generic()
|
|
|
|
: index(++nextIndex)
|
|
|
|
, name("g" + std::to_string(index))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Generic::Generic(TypeLevel level)
|
|
|
|
: index(++nextIndex)
|
|
|
|
, level(level)
|
|
|
|
, name("g" + std::to_string(index))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Generic::Generic(const Name& name)
|
|
|
|
: index(++nextIndex)
|
|
|
|
, name(name)
|
|
|
|
, explicitName(true)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-06-03 21:32:20 +01:00
|
|
|
Generic::Generic(Scope2* scope)
|
|
|
|
: index(++nextIndex)
|
|
|
|
, scope(scope)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-10-29 21:25:12 +01:00
|
|
|
Generic::Generic(TypeLevel level, const Name& name)
|
|
|
|
: index(++nextIndex)
|
|
|
|
, level(level)
|
|
|
|
, name(name)
|
|
|
|
, explicitName(true)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-06-24 02:44:07 +01:00
|
|
|
Generic::Generic(Scope2* scope, const Name& name)
|
|
|
|
: index(++nextIndex)
|
|
|
|
, scope(scope)
|
|
|
|
, name(name)
|
|
|
|
, explicitName(true)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-10-29 21:25:12 +01:00
|
|
|
int Generic::nextIndex = 0;
|
|
|
|
|
|
|
|
Error::Error()
|
|
|
|
: index(++nextIndex)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
int Error::nextIndex = 0;
|
|
|
|
|
|
|
|
} // namespace Unifiable
|
|
|
|
} // namespace Luau
|