// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #pragma once #include "Luau/Constraint.h" #include "Luau/DenseHash.h" #include "Luau/Error.h" #include namespace Luau { struct ConstraintSet { NotNull rootScope; std::vector constraints; // The set of all free types created during constraint generation DenseHashSet freeTypes{nullptr}; // Map a function's signature scope back to its signature type. Once we've // dispatched all of the constraints pertaining to a particular free type, // we use this mapping to generalize that free type. DenseHashMap scopeToFunction{nullptr}; // It is pretty uncommon for constraint generation to itself produce errors, but it can happen. std::vector errors; }; }