2022-04-15 07:57:43 +08:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
2022-09-09 06:14:25 +08:00
|
|
|
#pragma once
|
2022-04-15 07:57:43 +08:00
|
|
|
|
|
|
|
#include "Luau/Module.h"
|
2022-08-19 05:32:08 +08:00
|
|
|
#include "Luau/NotNull.h"
|
|
|
|
#include "Luau/TypeVar.h"
|
|
|
|
|
|
|
|
#include <memory>
|
2022-04-15 07:57:43 +08:00
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
|
|
|
struct InternalErrorReporter;
|
2022-08-19 05:32:08 +08:00
|
|
|
struct Module;
|
|
|
|
struct Scope;
|
2022-09-09 06:14:25 +08:00
|
|
|
struct SingletonTypes;
|
2022-08-19 05:32:08 +08:00
|
|
|
|
|
|
|
using ModulePtr = std::shared_ptr<Module>;
|
2022-04-15 07:57:43 +08:00
|
|
|
|
2022-09-24 03:17:25 +08:00
|
|
|
bool isSubtype(TypeId subTy, TypeId superTy, NotNull<Scope> scope, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice, bool anyIsTop = true);
|
|
|
|
bool isSubtype(TypePackId subTy, TypePackId superTy, NotNull<Scope> scope, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice, bool anyIsTop = true);
|
2022-09-09 06:14:25 +08:00
|
|
|
|
|
|
|
std::pair<TypeId, bool> normalize(
|
|
|
|
TypeId ty, NotNull<Scope> scope, TypeArena& arena, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
|
|
|
std::pair<TypeId, bool> normalize(TypeId ty, NotNull<Module> module, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
|
|
|
std::pair<TypeId, bool> normalize(TypeId ty, const ModulePtr& module, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
|
|
|
std::pair<TypePackId, bool> normalize(
|
|
|
|
TypePackId ty, NotNull<Scope> scope, TypeArena& arena, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
|
|
|
std::pair<TypePackId, bool> normalize(TypePackId ty, NotNull<Module> module, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
|
|
|
std::pair<TypePackId, bool> normalize(TypePackId ty, const ModulePtr& module, NotNull<SingletonTypes> singletonTypes, InternalErrorReporter& ice);
|
2022-04-15 07:57:43 +08:00
|
|
|
|
|
|
|
} // namespace Luau
|