Potemkin definitions: definitions in a macro-constructed structural type that are intended only to make an expression passed as an argument to another macro method typecheck before that macro rewrites it.
I came up with the trick to support this horrible abuse of Scala syntax:
speed are definitions in a structural type that have the same signatures as the fields on the case class, but they don’t actually do anything—if we call them we get a
NotImplementedError. They only exist to allow the block expression we’re passing to
set to typecheck before the macro implementation replaces them with something useful.
This is a little like an untyped macro, although instead of just turning off typechecking for the argument to
set, we’re coming up with an elaborate lie to trick the compiler into signing off on something that wouldn’t make any sense otherwise.