E152: Extension Can Only Have Defs
This error occurs when an extension clause with collective parameters contains something other than method definitions (def). Extension clauses that have collective type or value parameters can only contain method definitions. Other declarations like val, var, type, or nested classes are not allowed in this context.
Note This error was never emitted by stable Scala 3 compiler.
In this article