Skip to content
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

MatchError on PolyType regression in 2.3.0 #615

Closed
joroKr21 opened this issue Feb 6, 2022 · 4 comments
Closed

MatchError on PolyType regression in 2.3.0 #615

joroKr21 opened this issue Feb 6, 2022 · 4 comments
Labels

Comments

@joroKr21
Copy link

joroKr21 commented Feb 6, 2022

See for an example: typelevel/cats-tagless#319

Sample stack trace:

error: index.md:168 (mdoc generated code) exception during macro expansion: 
scala.MatchError: [+A]Vector[A] (of class scala.reflect.internal.Types$PolyType)
	at pprint.TPrintLowPri$.typePrintImplRec0(TPrintImpl.scala:151)
	at pprint.TPrintLowPri$.typePrintImplRec(TPrintImpl.scala:32)
	at pprint.TPrintLowPri$.$anonfun$typePrintImplRec0$7(TPrintImpl.scala:103)
	at scala.collection.immutable.List.map(List.scala:246)
	at pprint.TPrintLowPri$.added$2(TPrintImpl.scala:103)
	at pprint.TPrintLowPri$.printArgs$1(TPrintImpl.scala:106)
	at pprint.TPrintLowPri$.typePrintImplRec0(TPrintImpl.scala:200)
	at pprint.TPrintLowPri$.typePrintImplRec(TPrintImpl.scala:32)
	at pprint.TPrintLowPri$.typePrintImpl(TPrintImpl.scala:21)
	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$6(JavaReflectionRuntimes.scala:51)
	at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime(Macros.scala:770)

val vectorInterpreter = listInterpreter.mapK(λ[List ~> Vector](_.toVector)); $doc.binder(vectorInterpreter, 1, 4, 1, 21)
@joroKr21 joroKr21 changed the title MatchError on PolyType MatchError on PolyType regression in 2.3.0 Feb 6, 2022
@joroKr21
Copy link
Author

joroKr21 commented Feb 6, 2022

Looks like an issue in pprint? 🤔

@vlovgr
Copy link
Contributor

vlovgr commented Feb 7, 2022

Ran into the same issue in vlovgr/ciris#558. Issue for pprint seems to be com-lihaoyi/PPrint#76.

@tgodzik tgodzik added the bug label Feb 7, 2022
@mpilquist
Copy link

FYI this impacts FS2 as well, even when I use mdoc:to-string in all cases.

@joroKr21
Copy link
Author

This should be fixed in PPrint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants