Skip to content

Quotes printer doesn't support ErrorType #13942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cchantep opened this issue Nov 13, 2021 · 1 comment
Open

Quotes printer doesn't support ErrorType #13942

cchantep opened this issue Nov 13, 2021 · 1 comment
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API itype:bug stat:needs minimization Needs a self contained minimization

Comments

@cchantep
Copy link
Contributor

Compiler version

3.1.2-RC1-bin-20211022-f7abd32-NIGHTLY

Minimized code

import scala.quoted.*

import dotty.tools.dotc.core.Types.UnspecifiedErrorType

val tpe = UnspecifiedErrorType.asInstanceOf[TypeRepr]

tpe.show

Output

Exception occurred while executing macro expansion.
   scala.MatchError: dotty.tools.dotc.core.Types$PreviousErrorType@614b58f4 (of class dotty.tools.dotc.core.Types$PreviousErrorType)
   	at scala.quoted.runtime.impl.printers.Extractors$ExtractorsPrinter.visitType(Extractors.scala:242)

Expectation

Successfully print the type representation

cchantep added a commit to cchantep/dotty that referenced this issue Nov 13, 2021
cchantep added a commit to cchantep/dotty that referenced this issue Nov 14, 2021
@nicolasstucki
Copy link
Contributor

I guess that UnspecifiedErrorType appeared in a transparent inline macro while looking at other definitions. We will need to have a minimized version of this macro that reproduces the issue.

@nicolasstucki nicolasstucki added the stat:needs minimization Needs a self contained minimization label Nov 15, 2021
@nicolasstucki nicolasstucki added area:metaprogramming:reflection Issues related to the quotes reflection API and removed area:metaprogramming labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API itype:bug stat:needs minimization Needs a self contained minimization
Projects
None yet
Development

No branches or pull requests

3 participants