Skip to content

Type error after inlining in summonFrom with type parameter #24813

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.7.4., 3.8.1-RC1-bin-20251221-327be51-NIGHTLY

Minimized code

object test {
  class Seq[T]
  inline def f[T]: T = scala.compiletime.summonFrom {
    case given (Seq[t] =:= T) => new Seq[t]
  }

  f[Seq[Int]]
}

Output

[error] ./summon_from.scala:7:3
[error] Found:    test.Seq[Int]
[error] Required: test.Seq[t]
[error]   f[Seq[Int]]
[error]  

Expectation

Should compile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions