Dependent type seems to “not work” when generated by Scala macro
Apologies for the handwavey title. I’m not entirely sure how to phrase the question succinctly, since I’ve never encountered something like this before. Background info: I have the following trait, where the type U is meant to hold a Shapeless extensible record type: trait Flattened[T] { type U <: shapeless.HList def fields: U } I’m using a blackbox macro (for reasons outside the scope of this question) to create new instances of the trait: object flatten { import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context def apply[T](struct: T): Flattened[T] = macro impl