diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java index 2f0113db8..63c9f4de9 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java @@ -724,14 +724,14 @@ public static List getTopologicallyOrderedOrphanedShapesForService( final var walker = new Walker(model); final Set nonOrphanedShapes = walker.walkShapes(serviceShape); - // Walker will not walk into a referedShape in ReferenceTrait. - // Find refered shape and walk into it. + // Walker will not walk into a referred Shape in ReferenceTrait. + // Find referred shape and walk into it. final Set additionalShapes = new HashSet<>(); for (Shape shape : nonOrphanedShapes) { if(shape.hasTrait(ReferenceTrait.class)) { final ReferenceTrait referenceTrait = shape.expectTrait(ReferenceTrait.class); - final var referedShape = model.expectShape(referenceTrait.getReferentId()); - additionalShapes.addAll(walker.walkShapes(referedShape)); + final var referredShape = model.expectShape(referenceTrait.getReferentId()); + additionalShapes.addAll(walker.walkShapes(referredShape)); } } nonOrphanedShapes.addAll(additionalShapes);