Skip to content

Summon allows to ignore type bounds #17168

@Decel

Description

@Decel

Compiler version

3.3.0-RC1

Minimized code

scala> type F[X <: String] = X
// defined alias type F[X <: String] = X
                                                                                
scala> val a = summon[F[Int] =:= Int]
val a: Int =:= Int = generalized constraint

Output

Works. Both in REPL and Compiler.

Expectation

-- [E057] Type Mismatch Error: -------------------------------------------------
  |val a = summon[F[Int] =:= Int]
  |                 ^
  |                 Type argument Int does not conform to upper bound String

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions