From a7aafe90c87e0d7931fa15c6214a97f4496a08cb Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Thu, 23 Feb 2017 15:48:18 -0800 Subject: Fend off future bug - replace FixedPoint ":=" with "connect". (#516) This turned up after updating #494 (Remove explicit import of NotStrict) and adding the missing implicit CompileOptions to ":="'s signature at which point Scala pointed out FixedPoint's ":=" could not override Data's final ":=" with the same signature: the implicit time bomb.--- chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index cea2a679..574184d1 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -790,8 +790,8 @@ sealed class FixedPoint private (width: Width, val binaryPoint: BinaryPoint, lit new FixedPoint(w, binaryPoint).asInstanceOf[this.type] private[chisel3] def toType = s"Fixed$width$binaryPoint" - def := (that: Data)(implicit sourceInfo: SourceInfo): Unit = that match { - case _: FixedPoint => this connect that + override def connect (that: Data)(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions): Unit = that match { + case _: FixedPoint => super.connect(that) case _ => this badConnect that } -- cgit v1.2.3