summaryrefslogtreecommitdiff
path: root/source/slang/ir-union.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir-union.cpp')
-rw-r--r--source/slang/ir-union.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/ir-union.cpp b/source/slang/ir-union.cpp
index c50d669e1..91e60c5bf 100644
--- a/source/slang/ir-union.cpp
+++ b/source/slang/ir-union.cpp
@@ -366,7 +366,7 @@ struct DesugarUnionTypesContext
// there to be complete type layout information for the
// types involved.
//
- auto structTypeLayout = dynamic_cast<StructTypeLayout*>(payloadTypeLayout);
+ auto structTypeLayout = as<StructTypeLayout>(payloadTypeLayout);
SLANG_ASSERT(structTypeLayout);
// We are going to emit code to extract each of the fields
@@ -665,14 +665,14 @@ struct DesugarUnionTypesContext
info->replacementInst = structType;
// We require/expect the earlier code generation steps to have
- // assocaited a layout with every tagged union that appears in
+ // associated a layout with every tagged union that appears in
// the code.
//
auto layoutDecoration = type->findDecoration<IRLayoutDecoration>();
SLANG_ASSERT(layoutDecoration);
auto layout = layoutDecoration->getLayout();
SLANG_ASSERT(layout);
- auto taggedUnionTypeLayout = dynamic_cast<TaggedUnionTypeLayout*>(layout);
+ auto taggedUnionTypeLayout = as<TaggedUnionTypeLayout>(layout);
SLANG_ASSERT(taggedUnionTypeLayout);
info->taggedUnionTypeLayout = taggedUnionTypeLayout;