- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Closed
Labels
Milestone
Description
Compiler version
3.2.0-RC1
Minimized code
object Main {
 s"Hello $Main.toStr!"
}Output
This is the tree representing the string interpolation:
 Select(
    qualifier = Apply(
      fun = Select(
        qualifier = Apply(
          fun = Select(
            qualifier = Select(
              qualifier = Select(qualifier = Ident(name = _root_), name = scala),
              name = StringContext
            ),
            name = apply
          ),
          args = List(
            Typed(
              expr = SeqLiteral(
                elems = List(Literal(const = ( = "Hello "))),
                elemtpt = ...
              ),
              tpt = ...
            )
          )
        ),
        name = s
      ),
      args = List(
        ...
      )
    ),
    name = <error>
  ),Notice it only contains "Hello " literal.
Expectation
 Select(
    qualifier = Apply(
      fun = Select(
        qualifier = Apply(
          fun = Select(
            qualifier = Select(
              qualifier = Select(qualifier = Ident(name = _root_), name = scala),
              name = StringContext
            ),
            name = apply
          ),
          args = List(
            Typed(
              expr = SeqLiteral(
                 elems = List(Literal(const = ( = "Hello ")), Literal(const = ( = ".toStr!")))
                elemtpt = ...
              ),
              tpt = ...
            )
          )
        ),
        name = s
      ),
      args = List(
        ...
      )
    ),
    name = <error>
  ),The main part is  elems = List(Literal(const = ( = "Hello ")), Literal(const = ( = ".toStr!")))