Skip to content

Commit

Permalink
Sync to upstream Luau 0.635
Browse files Browse the repository at this point in the history
Fix compilation due to introduction of definitionLocation
  • Loading branch information
JohnnyMorganz committed Jul 20, 2024
1 parent 9b508f7 commit 326856e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Changed

- Sync to upstream Luau 0.635

## [1.32.0] - 2024-07-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion luau
Submodule luau updated from b6b74b to a7299c
12 changes: 8 additions & 4 deletions src/platform/roblox/RobloxSourcemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,17 @@ static Luau::TypeId getSourcemapType(const Luau::GlobalTypes& globals, Luau::Typ
}

// Point the metatable to the metatable of "Instance" so that we allow equality
std::optional<Luau::TypeId> instanceMetaIdentity;
if (auto* ctv = Luau::get<Luau::ClassType>(instanceTy->type))
instanceMetaIdentity = ctv->metatable;
auto* instanceCtv = Luau::get<Luau::ClassType>(instanceTy->type);
if (!instanceCtv)
{
ltv.unwrapped = globals.builtinTypes->anyType;
return;
}
std::optional<Luau::TypeId> instanceMetaIdentity = instanceCtv->metatable;

// Create the ClassType representing the instance
std::string typeName = types::getTypeName(baseTypeId).value_or(node->name);
Luau::ClassType baseInstanceCtv{typeName, {}, baseTypeId, instanceMetaIdentity, {}, {}, "@roblox"};
Luau::ClassType baseInstanceCtv{typeName, {}, baseTypeId, instanceMetaIdentity, {}, {}, instanceCtv->definitionModuleName, instanceCtv->definitionLocation};
auto typeId = arena.addType(std::move(baseInstanceCtv));

// Attach Parent and Children info
Expand Down

0 comments on commit 326856e

Please sign in to comment.