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"
|
2024-11-22 21:00:51 +00:00
|
|
|
#include "Luau/TypeFwd.h"
|
|
|
|
#include "Luau/TypePack.h"
|
2021-10-29 21:25:12 +01:00
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
namespace Unifiable
|
|
|
|
{
|
|
|
|
|
2022-10-07 01:23:29 +01:00
|
|
|
static int nextIndex = 0;
|
|
|
|
|
2023-03-17 19:20:37 +00:00
|
|
|
int freshIndex()
|
|
|
|
{
|
|
|
|
return ++nextIndex;
|
|
|
|
}
|
2023-03-24 18:03:04 +00:00
|
|
|
|
2024-11-22 21:00:51 +00:00
|
|
|
template<typename Id>
|
|
|
|
Error<Id>::Error()
|
2021-10-29 21:25:12 +01:00
|
|
|
: index(++nextIndex)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-11-22 21:00:51 +00:00
|
|
|
template<typename Id>
|
|
|
|
int Error<Id>::nextIndex = 0;
|
|
|
|
|
|
|
|
template struct Error<TypeId>;
|
|
|
|
template struct Error<TypePackId>;
|
2021-10-29 21:25:12 +01:00
|
|
|
|
|
|
|
} // namespace Unifiable
|
|
|
|
} // namespace Luau
|