Skip to content

Commit fc79937

Browse files
committed
Fix #27: Xplugin-list crashing
When generating a list of plugins, actual compiler instance (`global`) is not supplied. Using it eagerly in plugin components caused NPEs with this scenario
1 parent efe28eb commit fc79937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

better-monadic-for/src/main/scala/com/olegpy/bm4/BetterMonadicFor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import nsc.transform.{Transform, TypingTransformers}
1010
class BetterMonadicFor(val global: Global) extends Plugin {
1111
val name = "bm4"
1212
val description = "Remove withFilter / partial matches in for-comprehension"
13-
val components =
13+
lazy val components =
1414
new ForRewriter(this, global) ::
1515
new MapRemover(this, global) ::
1616
new TupleRemover(this, global) ::

0 commit comments

Comments
 (0)