Skip to content

inline implicit conversion infers Nothing for covariant types #19388

Open
@soronpo

Description

@soronpo

Compiler version

v3.3.1
v3.4.0-RC1

Minimized code

import language.implicitConversions
class Foo[+T]

implicit inline def conv[T, R](from: R): Foo[T] = 
  compiletime.summonInline[T =:= Int]
  new Foo[T]

val f: Foo[Int] = "o" //error

Output

Cannot prove that Nothing =:= Int.

Expectation

No error.

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