Skip to content

given declaration picks wrong type #12802

Closed
@scf37

Description

@scf37

Compiler version

3.0.0

Minimized code

import scala.quoted._

object Boo:
  def foo(using Quotes): Unit =
    import quotes.reflect._
    given Option[Symbol] = Some[Symbol](???)

Output

Found:    Some[x$1.reflect.Symbol]
Required: Option[Symbol²]

where:    Symbol  is a type in trait reflectModule with bounds <: AnyRef
          Symbol² is a class in package scala

Expectation

Successful compilation since both 'Symbol' should refer to reflect.Symbol and not scala.Symbol

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions