Nicolas Stucki

Results 138 comments of Nicolas Stucki

It seems there is a buggy interaction between function specialization and retained inlines. ```scala exception while retyping class MyMapper() extends Object(), (Int => Double) { inline def apply(v: Int): Double...

We probably need to generate an `apply$mcDI$sp$retainedBody` method when specializing functions (`SpecializeFunctions`).

We also do not need to specialize the inline version of the method.

> It's a bit complicated because of the way the $retainedBody dance works, as Nico explained to us. Early in compilation, we have inline def apply and private def apply$retainedBody....

I updated the milestone in #19405 to 3.5 to avoid confusion.

We can probably remove `-Yforce-inline-while-typing`. This was a flag added to emulate pre-3.0.0 behavior to avoid breaking early adopters' code.

We could use a `dotty.tools.dotc.Printers` instead of `-Ydebug-macros`. This is an internal debugging tool.

##### Miminized ```scala import compiletime.{summonInline, summonAll} class DialectTypeMappers: given aString: String = ??? inline def metadata(dialect: DialectTypeMappers): Unit = import dialect.given summonInline[String] // summonAll[Tuple1[String]] def f = metadata((??? : DialectTypeMappers))...

`summon` works correctly, therefore I assume that the context is properly updated with the correct import before expanding `summonInline`. My best guess so far we are using the wrong context...

Not that the code used `underlyingArgument` to get a tree that was not in scope. [This tree should not be used in the generated code](https://github.com/lampepfl/dotty/blob/main/library/src/scala/quoted/Quotes.scala#L761-L762). This might be the cause...