Skip to content

Commit

Permalink
fix: Builder can be returned as is if ptype is an exact match
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Oct 16, 2024
1 parent 110b7c6 commit a61a2b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/awst_build/eb/literal/object-expression-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export class ObjectExpressionBuilder extends InstanceExpressionBuilder<ObjectPTy
}

resolveToPType(ptype: PTypeOrClass): InstanceBuilder {
if (ptype.equals(this.ptype)) {
return this
}
if (this.resolvableToPType(ptype)) {
const base = this.singleEvaluation()
return instanceEb(
Expand Down

0 comments on commit a61a2b6

Please sign in to comment.