Task Summary
Once #7452 removes EmptyReplayLogger, the abstract base ReplayLogger has exactly one subclass and no declared-type site anywhere in the repo. ReplayLogManagerImpl builds it as new ReplayLoggerImpl(), so the inferred type is the concrete class — the base is never named as a type.
| Symbol |
Location |
Subclasses |
Declared-type sites |
ReplayLogger |
amber/.../engine/architecture/logreplay/ReplayLogger.scala:28 |
1 |
0 |
ReplayLogManager.scala:109 private val replayLogger = new ReplayLoggerImpl() -> inferred ReplayLoggerImpl
ReplayLoggerImpl.scala:31 class ReplayLoggerImpl extends ReplayLogger -> the only subclass
ReplayLogger.scala:28 abstract class ReplayLogger -> nothing else refers to it
The change: drop extends ReplayLogger from ReplayLoggerImpl, keep its three method bodies as they are, and delete ReplayLogger.scala. Roughly −40 lines, no behaviour change.
Raised as an advisory while reviewing #7452, under the "introduce an abstraction at the second use" standard. Kept out of that PR because this edits live code, whereas #7452 is a pure dead-code deletion.
Verification, once #7452 has merged:
git grep -n "ReplayLogger\b" -- '*.scala' # only the declaration and the one extends
Task Type
Task Summary
Once #7452 removes
EmptyReplayLogger, the abstract baseReplayLoggerhas exactly one subclass and no declared-type site anywhere in the repo.ReplayLogManagerImplbuilds it asnew ReplayLoggerImpl(), so the inferred type is the concrete class — the base is never named as a type.ReplayLoggeramber/.../engine/architecture/logreplay/ReplayLogger.scala:28The change: drop
extends ReplayLoggerfromReplayLoggerImpl, keep its three method bodies as they are, and deleteReplayLogger.scala. Roughly −40 lines, no behaviour change.Raised as an advisory while reviewing #7452, under the "introduce an abstraction at the second use" standard. Kept out of that PR because this edits live code, whereas #7452 is a pure dead-code deletion.
Verification, once #7452 has merged:
Task Type