Skip to content

Commit caf4b6e

Browse files
author
Oron Port
committed
disable class context in traits that caused a crash
1 parent 543a099 commit caf4b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/scala/plugin/MetaContextPlacerPhase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class MetaContextPlacerPhase(setting: Setting) extends CommonPhase:
135135
val clsTpe = tree.tpe
136136
val clsSym = clsTpe.classSymbol.asClass
137137

138-
if (clsTpe <:< hasClsMetaArgsTpe && !clsSym.isAnonymousClass)
138+
if (clsTpe <:< hasClsMetaArgsTpe && !clsSym.isAnonymousClass && !clsSym.flags.is(Trait))
139139
val paramBody = template.body.takeWhile {
140140
case x: TypeDef => true
141141
case x: ValDef if x.rhs.isEmpty => true

0 commit comments

Comments
 (0)