From 07b977850f90b34c1d0b49efa3d5d16091f806bc Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Wed, 11 Jan 2023 15:54:45 +0000 Subject: [PATCH] Fix clones --- Analysis/src/Anyification.cpp | 1 + Analysis/src/Clone.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Analysis/src/Anyification.cpp b/Analysis/src/Anyification.cpp index e0ddeacf..15dd25cc 100644 --- a/Analysis/src/Anyification.cpp +++ b/Analysis/src/Anyification.cpp @@ -59,6 +59,7 @@ TypeId Anyification::clean(TypeId ty) { TableType clone = TableType{ttv->props, ttv->indexer, ttv->level, TableState::Sealed}; clone.definitionModuleName = ttv->definitionModuleName; + clone.definitionLocation = ttv->definitionLocation; clone.name = ttv->name; clone.syntheticName = ttv->syntheticName; clone.tags = ttv->tags; diff --git a/Analysis/src/Clone.cpp b/Analysis/src/Clone.cpp index 870d2949..3dd8df87 100644 --- a/Analysis/src/Clone.cpp +++ b/Analysis/src/Clone.cpp @@ -263,6 +263,7 @@ void TypeCloner::operator()(const TableType& t) arg = clone(arg, dest, cloneState); ttv->definitionModuleName = t.definitionModuleName; + ttv->definitionLocation = t.definitionLocation; ttv->tags = t.tags; } @@ -446,6 +447,7 @@ TypeId shallowClone(TypeId ty, TypeArena& dest, const TxnLog* log, bool alwaysCl LUAU_ASSERT(!ttv->boundTo); TableType clone = TableType{ttv->props, ttv->indexer, ttv->level, ttv->scope, ttv->state}; clone.definitionModuleName = ttv->definitionModuleName; + clone.definitionLocation = ttv->definitionLocation; clone.name = ttv->name; clone.syntheticName = ttv->syntheticName; clone.instantiatedTypeParams = ttv->instantiatedTypeParams;