Skip to content

Commit 5573bcc

Browse files
committed
[core] Ensure ++ works for Property[String]
Fix an issue where infix `++` did not work for `Property[String]` because this would fallback to the list version (which also has the same infix operator). Assisted-by: pi.dev:gpt-5.6-luna Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
1 parent c9c0e68 commit 5573bcc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

core/src/main/scala/chisel3/properties/Property.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,13 @@ object PropertySequenceOps {
628628
def concat(lhs: Property[S[U]], rhs: Property[S[U]])(implicit sourceInfo: SourceInfo) =
629629
binOp(sourceInfo, fir.ListConcatOp, lhs, rhs)
630630
}
631+
632+
// Ensure that `++` is available for `Property[String]`.
633+
implicit val stringOps: PropertySequenceOps[Property[String]] =
634+
new PropertySequenceOps[Property[String]] {
635+
def concat(lhs: Property[String], rhs: Property[String])(implicit sourceInfo: SourceInfo) =
636+
binOp(sourceInfo, fir.StringConcatOp, lhs, rhs)
637+
}
631638
}
632639

633640
/** Typeclass for Property string operations.

0 commit comments

Comments
 (0)