@@ -241,54 +241,8 @@ std::string toString(const TypePath::Path& path, bool prefixDot = false);
241241// / Converts a Path to a human readable string for error reporting.
242242std::string toStringHuman (const TypePath::Path& path);
243243
244- // To keep my head straight when clipping:
245- // LuauReturnMappedGenericPacksFromSubtyping3 expects mappedGenericPacks AND arena
246- // LuauSubtypingGenericPacksDoesntUseVariance2 expects just arena. this is the final state
247-
248- // TODO: clip below two along with `LuauReturnMappedGenericPacksFromSubtyping3`
249- std::optional<TypeOrPack> traverse_DEPRECATED (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
250- std::optional<TypeOrPack> traverse_DEPRECATED (TypePackId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
251244std::optional<TypeOrPack> traverse (TypePackId root, const Path& path, NotNull<BuiltinTypes> builtinTypes, NotNull<TypeArena> arena);
252- // TODO: Clip with LuauSubtypingGenericPacksDoesntUseVariance2
253- std::optional<TypeOrPack> traverse_DEPRECATED (
254- TypePackId root,
255- const Path& path,
256- NotNull<BuiltinTypes> builtinTypes,
257- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
258- NotNull<TypeArena> arena
259- );
260245std::optional<TypeOrPack> traverse (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes, NotNull<TypeArena> arena);
261- // TODO: Clip with LuauSubtypingGenericPacksDoesntUseVariance2
262- std::optional<TypeOrPack> traverse_DEPRECATED (
263- TypeId root,
264- const Path& path,
265- NotNull<BuiltinTypes> builtinTypes,
266- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
267- NotNull<TypeArena> arena
268- );
269-
270- // / Traverses a path from a type to its end point, which must be a type. This overload will fail if the path contains a PackSlice component or a
271- // / mapped generic pack.
272- // / @param root the entry point of the traversal
273- // / @param path the path to traverse
274- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
275- // / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
276- std::optional<TypeId> traverseForType_DEPRECATED (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
277-
278- // / Traverses a path from a type to its end point, which must be a type.
279- // / @param root the entry point of the traversal
280- // / @param path the path to traverse
281- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
282- // / @param mappedGenericPacks the mapping for any encountered generic packs we want to reify
283- // / @param arena a TypeArena, required if path has a PackSlice component
284- // / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
285- std::optional<TypeId> traverseForType_DEPRECATED (
286- TypeId root,
287- const Path& path,
288- NotNull<BuiltinTypes> builtinTypes,
289- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
290- NotNull<TypeArena> arena
291- );
292246
293247// / Traverses a path from a type to its end point, which must be a type.
294248// / @param root the entry point of the traversal
@@ -298,28 +252,6 @@ std::optional<TypeId> traverseForType_DEPRECATED(
298252// / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
299253std::optional<TypeId> traverseForType (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes, NotNull<TypeArena> arena);
300254
301- // / Traverses a path from a type pack to its end point, which must be a type.
302- // / @param root the entry point of the traversal
303- // / @param path the path to traverse
304- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
305- // / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
306- std::optional<TypeId> traverseForType_DEPRECATED (TypePackId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
307-
308- // / Traverses a path from a type pack to its end point, which must be a type.
309- // / @param root the entry point of the traversal
310- // / @param path the path to traverse
311- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
312- // / @param mappedGenericPacks the mapping for any encountered generic packs we want to reify
313- // / @param arena a TypeArena, required if path has a PackSlice component
314- // / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
315- std::optional<TypeId> traverseForType_DEPRECATED (
316- TypePackId root,
317- const Path& path,
318- NotNull<BuiltinTypes> builtinTypes,
319- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
320- NotNull<TypeArena> arena
321- );
322-
323255// / Traverses a path from a type pack to its end point, which must be a type.
324256// / @param root the entry point of the traversal
325257// / @param path the path to traverse
@@ -328,29 +260,6 @@ std::optional<TypeId> traverseForType_DEPRECATED(
328260// / @returns the TypeId at the end of the path, or nullopt if the traversal failed.
329261std::optional<TypeId> traverseForType (TypePackId root, const Path& path, NotNull<BuiltinTypes> builtinTypes, NotNull<TypeArena> arena);
330262
331- // / Traverses a path from a type to its end point, which must be a type pack. This overload will fail if the path contains a PackSlice component or a
332- // / mapped generic pack.
333- // / @param root the entry point of the traversal
334- // / @param path the path to traverse
335- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
336- // / @returns the TypePackId at the end of the path, or nullopt if the traversal failed.
337- std::optional<TypePackId> traverseForPack_DEPRECATED (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
338-
339- // / Traverses a path from a type to its end point, which must be a type pack.
340- // / @param root the entry point of the traversal
341- // / @param path the path to traverse
342- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
343- // / @param mappedGenericPacks the mapping for any encountered generic packs we want to reify
344- // / @param arena a TypeArena, required if path has a PackSlice component
345- // / @returns the TypePackId at the end of the path, or nullopt if the traversal failed.
346- std::optional<TypePackId> traverseForPack_DEPRECATED (
347- TypeId root,
348- const Path& path,
349- NotNull<BuiltinTypes> builtinTypes,
350- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
351- NotNull<TypeArena> arena
352- );
353-
354263// / Traverses a path from a type to its end point, which must be a type pack.
355264// / @param root the entry point of the traversal
356265// / @param path the path to traverse
@@ -359,28 +268,6 @@ std::optional<TypePackId> traverseForPack_DEPRECATED(
359268// / @returns the TypePackId at the end of the path, or nullopt if the traversal failed.
360269std::optional<TypePackId> traverseForPack (TypeId root, const Path& path, NotNull<BuiltinTypes> builtinTypes, NotNull<TypeArena> arena);
361270
362- // / Traverses a path from a type pack to its end point, which must be a type pack.
363- // / @param root the entry point of the traversal
364- // / @param path the path to traverse
365- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
366- // / @returns the TypePackId at the end of the path, or nullopt if the traversal failed.
367- std::optional<TypePackId> traverseForPack_DEPRECATED (TypePackId root, const Path& path, NotNull<BuiltinTypes> builtinTypes);
368-
369- // / Traverses a path from a type pack to its end point, which must be a type pack.
370- // / @param root the entry point of the traversal
371- // / @param path the path to traverse
372- // / @param builtinTypes the built-in types in use (used to acquire the string metatable)
373- // / @param mappedGenericPacks the mapping for any encountered generic packs we want to reify
374- // / @param arena a TypeArena, required if path has a PackSlice component
375- // / @returns the TypePackId at the end of the path, or nullopt if the traversal failed.
376- std::optional<TypePackId> traverseForPack_DEPRECATED (
377- TypePackId root,
378- const Path& path,
379- NotNull<BuiltinTypes> builtinTypes,
380- NotNull<const DenseHashMap<TypePackId, TypePackId>> mappedGenericPacks,
381- NotNull<TypeArena> arena
382- );
383-
384271// / Traverses a path from a type pack to its end point, which must be a type pack.
385272// / @param root the entry point of the traversal
386273// / @param path the path to traverse
0 commit comments