Skip to content

-Yexplicit-nulls breaks obtaining quoted.Type #23937

@WojciechMazur

Description

@WojciechMazur

Based on OpenCB failure in com-lihaoyi/mill-moduledefs - build logs
Related to #23935

Compiler version

Last good release: 3.8.0-RC1-bin-20250822-658c8bd-NIGHTLY
First bad release: 3.8.0-RC1-bin-20250823-712d5bc-NIGHTLY

Minimized code

//> using options -Yexplicit-nulls

import scala.quoted.*

trait Cacher
object Cacher:
  def impl[T: Type](using Quotes): Expr[T] = 
    import quotes.reflect.*
    val CacherSym = TypeRepr.of[Cacher].typeSymbol
    ???

Output

-- [E172] Type Error: /Users/wmazur/projects/scala/community-build3/test.scala:9:39 ---------------------------------------------------------------------------------------------------------
9 |    val CacherSym = TypeRepr.of[Cacher].typeSymbol
  |                                       ^
  |                                       No given instance of type (scala.quoted.Type[Cacher])? was found for parameter x$1 of method of in trait TypeReprModule
1 error found

Expectation

Should compile

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions