aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/Compiler.scala
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-11-07 12:33:22 -0500
committerSchuyler Eldridge2019-11-14 13:47:03 -0500
commitb076ac8fb482d2ef694f5b941cd8d72a2d9761ef (patch)
tree5d8221340400fadc8742888d7b435d18ceeab7ba /src/main/scala/firrtl/Compiler.scala
parent4d80f5d41a6cd05838999b7b64389fc053325a18 (diff)
Use getName instead of getSimpleName
This changes uses of `getSimpleName` to `getName`. The former throws idiotic exceptions under Java 8, e.g., `getSimpleName` will fail if used on a class inside an object. This fixes a bug where any call to the `name` method of a custom transform defined inside an object (or in an environment wrapping things in objects like a REPL) will throw a malformed class name exception. E.g., if you do this and run with `-ll info` or your custom transform deletes annotations. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/firrtl/Compiler.scala')
-rw-r--r--src/main/scala/firrtl/Compiler.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala
index 600b991e..9014d213 100644
--- a/src/main/scala/firrtl/Compiler.scala
+++ b/src/main/scala/firrtl/Compiler.scala
@@ -171,7 +171,7 @@ final case object UnknownForm extends CircuitForm(-1) {
/** The basic unit of operating on a Firrtl AST */
abstract class Transform extends TransformLike[CircuitState] {
/** A convenience function useful for debugging and error messages */
- def name: String = this.getClass.getSimpleName
+ def name: String = this.getClass.getName
/** The [[firrtl.CircuitForm]] that this transform requires to operate on */
def inputForm: CircuitForm
/** The [[firrtl.CircuitForm]] that this transform outputs */