Skip to content

Regression in exported extension method construction #15496

Closed
@soronpo

Description

@soronpo

Compiler version

v3.2.0-RC1 - error
v3.1.3-RC4 - OK

Minimized code

object Cont:
  extension [T <: Int & Singleton](x: T) inline def foo: Unit = {}
  extension (x: Int) inline def foo: Unit = {}

export Cont.*

object Test:
  var x = 1
  x.foo

Output

An extension method was tried, but could not be fully constructed:

    foo[T](x)    failed with

        Found:    (x : Int)
        Required: Int & Singleton

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