Scala 3: abstract given in Quotes.Symbol / SymbolMethods

How does this work I ask myself, diving into the scala 3 metaprogramming facilities:

in https://github.com/lampepfl/dotty/blob/f7abd32359bc9e7ca9c39247f2fe579116eb4e29/library/src/scala/quoted/Quotes.scala#L3561

there is this

given SymbolMethods: SymbolMethods

followed by a abstract definition without implementation of the trait SymbolMethods.
Where are these implementations, but more important: How are they picked up and is there any documentation of this abstract given extension pattern?

As a side question, is there anything wrong with providing such “automatic extensions” next to the type they’re on, in this style?

given ClassMethods.type: ClassMethods
object ClassMethods
  extension(self: Class)
    def foo() = println("foo")

Thanks for the guidance :slight_smile:

It appears to be an abstract given. It’s in Quotes, which is a trait, so its subclasses will implement that.