scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

By-name (lazy) implicits compiler crash in 2.13.0 #11591

Closed joroKr21 closed 5 years ago

joroKr21 commented 5 years ago

Unfortunately I don't have a minimized example but it's at least reproducible.

How to reproduce:

git clone git@github.com:joroKr21/kittens.git
cd kittens
git checkout lazy-implicit-crash
sbt test:compile

This is the line that causes the crash: joroKr21/kittens@55dd188cab227672e29e615880ab022417515916

JVM backend error ``` [warn] an unexpected type representation reached the compiler backend while compiling empty.scala: . If possible, please file a bug on https://github.com/scala/bug/issues. [error] Error while emitting empty.scala [error] (of class scala.reflect.internal.Types$ErrorType$) [error] Error while emitting empty.scala [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting empty.scala [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite$LazyDefns$3$1; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$3$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$5$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$7$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$13$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$16$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$17$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$21$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$LazyDefns$1$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$LazyDefns$1$2$anon$macro$22$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$LazyDefns$1$2$anon$macro$26$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$anon$macro$28$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$LazyDefns$2$2 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$semiTests$LazyDefns$2$2$anon$macro$31$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$3$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$5$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$7$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$13$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$16$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$17$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$24$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$1$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$1$1$anon$macro$25$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$1$1$anon$macro$32$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$34$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$2$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$2$1$anon$macro$37$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$48$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$52$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$54$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$62$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$67$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$70$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$77$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$4$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$4$1$anon$macro$80$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$4$1$anon$macro$87$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$anon$macro$91$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$5$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$LazyDefns$5$1$anon$macro$96$1 [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$Dummy [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$Chain [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$Chain$ [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$Mask [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [error] Error while emitting cats/derived/EmptySuite$Mask$ [error] assertion failed: ClassBType.info not yet assigned: Lcats/derived/EmptySuite; [warn] one warning found [error] 47 errors found ```
JS backend error ``` [error] [error] Unknown type: , [class scala.reflect.internal.Types$ErrorType$, class scala.reflect.internal.Types$ErrorType$] TypeRef? false [error] while compiling: ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] during phase: jscode [error] library version: version 2.13.0 [error] compiler version: version 2.13.0 [error] reconstructed args: -Xplugin:~/.ivy2/cache/org.scala-js/scalajs-compiler_2.13.0/jars/scalajs-compiler_2.13.0-0.6.28.jar -Xplugin:~/.ivy2/cache/org.typelevel/kind-projector_2.13/jars/kind-projector_2.13-0.10.3.jar -deprecation -language:higherKinds -language:implicitConversions -bootclasspath /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes:~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.0.jar -classpath ~/kittens/core/.js/target/scala-2.13/test-classes:~/kittens/core/.js/target/scala-2.13/classes:~/.ivy2/cache/org.scala-js/scalajs-library_2.13/jars/scalajs-library_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-core_2.13/jars/cats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-macros_2.13/jars/cats-macros_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/machinist_2.13/jars/machinist_2.13-0.6.8.jar:~/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.0.jar:~/.ivy2/cache/org.typelevel/cats-kernel_2.13/jars/cats-kernel_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/alleycats-core_2.13/jars/alleycats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/com.chuusai/shapeless_2.13/bundles/shapeless_2.13-2.3.3.jar:~/.ivy2/cache/org.scala-js/scalajs-test-interface_2.13/jars/scalajs-test-interface_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-testkit_2.13/jars/cats-testkit_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-laws_2.13/jars/cats-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-kernel-laws_2.13/jars/cats-kernel-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.scalacheck/scalacheck_2.13/jars/scalacheck_2.13-1.14.0.jar:~/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar:~/.ivy2/cache/org.typelevel/discipline-core_2.13/jars/discipline-core_2.13-0.12.0-M3.jar:~/.ivy2/cache/org.scalatest/scalatest_2.13/bundles/scalatest_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scalactic/scalactic_2.13/bundles/scalactic_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scala-lang.modules/scala-xml_2.13/bundles/scala-xml_2.13-1.2.0.jar:~/.ivy2/cache/org.scalatestplus/scalatestplus-scalacheck_2.13/bundles/scalatestplus-scalacheck_2.13-1.0.0-SNAP8.jar:~/.ivy2/cache/org.typelevel/discipline-scalatest_2.13/jars/discipline-scalatest_2.13-0.12.0-M3.jar -unchecked -feature [error] [error] last tree to typer: TypeTree(class String) [error] tree position: line 93 of ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] tree tpe: String [error] symbol: final class String in package lang [error] symbol definition: final class String extends Serializable with Comparable with CharSequence (a ClassSymbol) [error] symbol package: java.lang [error] symbol owners: class String [error] call site: object EmptySuite$Mask in package derived in package derived [error] [error] == Source file context for tree position == [error] [error] 90 [error] 91 trait Dummy [error] 92 final case class Chain(head: Int, tail: Chain) [error] 93 final case class Mask(bits: Int) [error] 94 object Mask { [error] 95 implicit val empty: Empty[Mask] = Empty(Mask(0xffffffff)) [error] 96 } [error] ## Exception when compiling 26 sources to ~/kittens/core/.js/target/scala-2.13/test-classes [error] [error] Unknown type: , [class scala.reflect.internal.Types$ErrorType$, class scala.reflect.internal.Types$ErrorType$] TypeRef? false [error] while compiling: ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] during phase: jscode [error] library version: version 2.13.0 [error] compiler version: version 2.13.0 [error] reconstructed args: -Xplugin:~/.ivy2/cache/org.scala-js/scalajs-compiler_2.13.0/jars/scalajs-compiler_2.13.0-0.6.28.jar -Xplugin:~/.ivy2/cache/org.typelevel/kind-projector_2.13/jars/kind-projector_2.13-0.10.3.jar -deprecation -language:higherKinds -language:implicitConversions -bootclasspath /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes:~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.0.jar -classpath ~/kittens/core/.js/target/scala-2.13/test-classes:~/kittens/core/.js/target/scala-2.13/classes:~/.ivy2/cache/org.scala-js/scalajs-library_2.13/jars/scalajs-library_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-core_2.13/jars/cats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-macros_2.13/jars/cats-macros_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/machinist_2.13/jars/machinist_2.13-0.6.8.jar:~/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.0.jar:~/.ivy2/cache/org.typelevel/cats-kernel_2.13/jars/cats-kernel_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/alleycats-core_2.13/jars/alleycats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/com.chuusai/shapeless_2.13/bundles/shapeless_2.13-2.3.3.jar:~/.ivy2/cache/org.scala-js/scalajs-test-interface_2.13/jars/scalajs-test-interface_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-testkit_2.13/jars/cats-testkit_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-laws_2.13/jars/cats-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-kernel-laws_2.13/jars/cats-kernel-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.scalacheck/scalacheck_2.13/jars/scalacheck_2.13-1.14.0.jar:~/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar:~/.ivy2/cache/org.typelevel/discipline-core_2.13/jars/discipline-core_2.13-0.12.0-M3.jar:~/.ivy2/cache/org.scalatest/scalatest_2.13/bundles/scalatest_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scalactic/scalactic_2.13/bundles/scalactic_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scala-lang.modules/scala-xml_2.13/bundles/scala-xml_2.13-1.2.0.jar:~/.ivy2/cache/org.scalatestplus/scalatestplus-scalacheck_2.13/bundles/scalatestplus-scalacheck_2.13-1.0.0-SNAP8.jar:~/.ivy2/cache/org.typelevel/discipline-scalatest_2.13/jars/discipline-scalatest_2.13-0.12.0-M3.jar -unchecked -feature [error] [error] last tree to typer: TypeTree(class String) [error] tree position: line 93 of ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] tree tpe: String [error] symbol: final class String in package lang [error] symbol definition: final class String extends Serializable with Comparable with CharSequence (a ClassSymbol) [error] symbol package: java.lang [error] symbol owners: class String [error] call site: object EmptySuite$Mask in package derived in package derived [error] [error] == Source file context for tree position == [error] [error] 90 [error] 91 trait Dummy [error] 92 final case class Chain(head: Int, tail: Chain) [error] 93 final case class Mask(bits: Int) [error] 94 object Mask { [error] 95 implicit val empty: Empty[Mask] = Empty(Mask(0xffffffff)) [error] 96 } [error] scala.reflect.internal.Reporting.abort(Reporting.scala:68) [error] scala.reflect.internal.Reporting.abort$(Reporting.scala:64) [error] scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:28) [error] org.scalajs.core.compiler.TypeKinds.toTypeKind(TypeKinds.scala:219) [error] org.scalajs.core.compiler.TypeKinds.toTypeKind$(TypeKinds.scala:189) [error] org.scalajs.core.compiler.GenJSCode.toTypeKind(GenJSCode.scala:37) [error] org.scalajs.core.compiler.JSEncoding.internalName(JSEncoding.scala:287) [error] org.scalajs.core.compiler.JSEncoding.makeParamsString(JSEncoding.scala:278) [error] org.scalajs.core.compiler.JSEncoding.encodeMethodNameInternal(JSEncoding.scala:198) [error] org.scalajs.core.compiler.JSEncoding.encodeMethodSym(JSEncoding.scala:150) [error] org.scalajs.core.compiler.JSEncoding.encodeMethodSym$(JSEncoding.scala:148) [error] org.scalajs.core.compiler.GenJSCode.encodeMethodSym(GenJSCode.scala:37) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genApplyMethod(GenJSCode.scala:2874) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genNormalApply(GenJSCode.scala:2717) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genApply(GenJSCode.scala:2374) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genStatOrExpr(GenJSCode.scala:1909) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genExpr(GenJSCode.scala:1834) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genBody$1(GenJSCode.scala:1764) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethodDef(GenJSCode.scala:1769) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethodWithCurrentLocalNameScope$8(GenJSCode.scala:1553) [error] org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethodWithCurrentLocalNameScope$1(GenJSCode.scala:1515) [error] org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethodWithCurrentLocalNameScope(GenJSCode.scala:1460) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethod$1(GenJSCode.scala:1424) [error] org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] org.scalajs.core.compiler.JSEncoding.withNewLocalNameScope(JSEncoding.scala:63) [error] org.scalajs.core.compiler.JSEncoding.withNewLocalNameScope$(JSEncoding.scala:59) [error] org.scalajs.core.compiler.GenJSCode.withNewLocalNameScope(GenJSCode.scala:37) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethod(GenJSCode.scala:1424) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.gen$1(GenJSCode.scala:398) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genClass$3(GenJSCode.scala:389) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genClass$3$adapted(GenJSCode.scala:389) [error] scala.collection.immutable.List.foreach(List.scala:312) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.gen$1(GenJSCode.scala:389) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.genClass(GenJSCode.scala:404) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$apply$6(GenJSCode.scala:320) [error] org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$apply$5(GenJSCode.scala:307) [error] scala.collection.immutable.List.foreach(List.scala:312) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.apply(GenJSCode.scala:294) [error] scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:451) [error] scala.tools.nsc.Global$GlobalPhase.run(Global.scala:396) [error] org.scalajs.core.compiler.GenJSCode$JSCodePhase.run(GenJSCode.scala:225) [error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1510) [error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1494) [error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1486) [error] scala.tools.nsc.Global$Run.compile(Global.scala:1615) [error] xsbt.CachedCompiler0.run(CompilerInterface.scala:130) [error] xsbt.CachedCompiler0.run(CompilerInterface.scala:105) [error] xsbt.CompilerInterface.run(CompilerInterface.scala:31) [error] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [error] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [error] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [error] java.lang.reflect.Method.invoke(Method.java:498) [error] sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237) [error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111) [error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90) [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:82) [error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) [error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:133) [error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:73) [error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:116) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:307) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:307) [error] sbt.internal.inc.Incremental$.doCompile(Incremental.scala:106) [error] sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:87) [error] sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:116) [error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:63) [error] sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:89) [error] sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:134) [error] sbt.internal.inc.Incremental$.compile(Incremental.scala:80) [error] sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:67) [error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:311) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:269) [error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:159) [error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:238) [error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:69) [error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1549) [error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1523) [error] scala.Function1.$anonfun$compose$1(Function1.scala:44) [error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40) [error] sbt.std.Transform$$anon$4.work(System.scala:67) [error] sbt.Execute.$anonfun$submit$2(Execute.scala:269) [error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) [error] sbt.Execute.work(Execute.scala:278) [error] sbt.Execute.$anonfun$submit$1(Execute.scala:269) [error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) [error] sbt.CompletionService$$anon$2.call(CompletionService.scala:37) [error] java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [error] java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [error] java.lang.Thread.run(Thread.java:748) [error] [error] scala.reflect.internal.FatalError: [error] Unknown type: , [class scala.reflect.internal.Types$ErrorType$, class scala.reflect.internal.Types$ErrorType$] TypeRef? false [error] while compiling: ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] during phase: jscode [error] library version: version 2.13.0 [error] compiler version: version 2.13.0 [error] reconstructed args: -Xplugin:~/.ivy2/cache/org.scala-js/scalajs-compiler_2.13.0/jars/scalajs-compiler_2.13.0-0.6.28.jar -Xplugin:~/.ivy2/cache/org.typelevel/kind-projector_2.13/jars/kind-projector_2.13-0.10.3.jar -deprecation -language:higherKinds -language:implicitConversions -bootclasspath /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes:~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.0.jar -classpath ~/kittens/core/.js/target/scala-2.13/test-classes:~/kittens/core/.js/target/scala-2.13/classes:~/.ivy2/cache/org.scala-js/scalajs-library_2.13/jars/scalajs-library_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-core_2.13/jars/cats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-macros_2.13/jars/cats-macros_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/machinist_2.13/jars/machinist_2.13-0.6.8.jar:~/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.0.jar:~/.ivy2/cache/org.typelevel/cats-kernel_2.13/jars/cats-kernel_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/alleycats-core_2.13/jars/alleycats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/com.chuusai/shapeless_2.13/bundles/shapeless_2.13-2.3.3.jar:~/.ivy2/cache/org.scala-js/scalajs-test-interface_2.13/jars/scalajs-test-interface_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-testkit_2.13/jars/cats-testkit_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-laws_2.13/jars/cats-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-kernel-laws_2.13/jars/cats-kernel-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.scalacheck/scalacheck_2.13/jars/scalacheck_2.13-1.14.0.jar:~/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar:~/.ivy2/cache/org.typelevel/discipline-core_2.13/jars/discipline-core_2.13-0.12.0-M3.jar:~/.ivy2/cache/org.scalatest/scalatest_2.13/bundles/scalatest_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scalactic/scalactic_2.13/bundles/scalactic_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scala-lang.modules/scala-xml_2.13/bundles/scala-xml_2.13-1.2.0.jar:~/.ivy2/cache/org.scalatestplus/scalatestplus-scalacheck_2.13/bundles/scalatestplus-scalacheck_2.13-1.0.0-SNAP8.jar:~/.ivy2/cache/org.typelevel/discipline-scalatest_2.13/jars/discipline-scalatest_2.13-0.12.0-M3.jar -unchecked -feature [error] [error] last tree to typer: TypeTree(class String) [error] tree position: line 93 of ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] tree tpe: String [error] symbol: final class String in package lang [error] symbol definition: final class String extends Serializable with Comparable with CharSequence (a ClassSymbol) [error] symbol package: java.lang [error] symbol owners: class String [error] call site: object EmptySuite$Mask in package derived in package derived [error] [error] == Source file context for tree position == [error] [error] 90 [error] 91 trait Dummy [error] 92 final case class Chain(head: Int, tail: Chain) [error] 93 final case class Mask(bits: Int) [error] 94 object Mask { [error] 95 implicit val empty: Empty[Mask] = Empty(Mask(0xffffffff)) [error] 96 } [error] at scala.reflect.internal.Reporting.abort(Reporting.scala:68) [error] at scala.reflect.internal.Reporting.abort$(Reporting.scala:64) [error] at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:28) [error] at org.scalajs.core.compiler.TypeKinds.toTypeKind(TypeKinds.scala:219) [error] at org.scalajs.core.compiler.TypeKinds.toTypeKind$(TypeKinds.scala:189) [error] at org.scalajs.core.compiler.GenJSCode.toTypeKind(GenJSCode.scala:37) [error] at org.scalajs.core.compiler.JSEncoding.internalName(JSEncoding.scala:287) [error] at org.scalajs.core.compiler.JSEncoding.makeParamsString(JSEncoding.scala:278) [error] at org.scalajs.core.compiler.JSEncoding.encodeMethodNameInternal(JSEncoding.scala:198) [error] at org.scalajs.core.compiler.JSEncoding.encodeMethodSym(JSEncoding.scala:150) [error] at org.scalajs.core.compiler.JSEncoding.encodeMethodSym$(JSEncoding.scala:148) [error] at org.scalajs.core.compiler.GenJSCode.encodeMethodSym(GenJSCode.scala:37) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genApplyMethod(GenJSCode.scala:2874) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genNormalApply(GenJSCode.scala:2717) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genApply(GenJSCode.scala:2374) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genStatOrExpr(GenJSCode.scala:1909) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genExpr(GenJSCode.scala:1834) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genBody$1(GenJSCode.scala:1764) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethodDef(GenJSCode.scala:1769) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethodWithCurrentLocalNameScope$8(GenJSCode.scala:1553) [error] at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethodWithCurrentLocalNameScope$1(GenJSCode.scala:1515) [error] at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethodWithCurrentLocalNameScope(GenJSCode.scala:1460) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genMethod$1(GenJSCode.scala:1424) [error] at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] at org.scalajs.core.compiler.JSEncoding.withNewLocalNameScope(JSEncoding.scala:63) [error] at org.scalajs.core.compiler.JSEncoding.withNewLocalNameScope$(JSEncoding.scala:59) [error] at org.scalajs.core.compiler.GenJSCode.withNewLocalNameScope(GenJSCode.scala:37) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genMethod(GenJSCode.scala:1424) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.gen$1(GenJSCode.scala:398) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genClass$3(GenJSCode.scala:389) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$genClass$3$adapted(GenJSCode.scala:389) [error] at scala.collection.immutable.List.foreach(List.scala:312) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.gen$1(GenJSCode.scala:389) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genClass(GenJSCode.scala:404) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$apply$6(GenJSCode.scala:320) [error] at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:47) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.$anonfun$apply$5(GenJSCode.scala:307) [error] at scala.collection.immutable.List.foreach(List.scala:312) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.apply(GenJSCode.scala:294) [error] at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:451) [error] at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:396) [error] at org.scalajs.core.compiler.GenJSCode$JSCodePhase.run(GenJSCode.scala:225) [error] at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1510) [error] at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1494) [error] at scala.tools.nsc.Global$Run.compileSources(Global.scala:1486) [error] at scala.tools.nsc.Global$Run.compile(Global.scala:1615) [error] at xsbt.CachedCompiler0.run(CompilerInterface.scala:130) [error] at xsbt.CachedCompiler0.run(CompilerInterface.scala:105) [error] at xsbt.CompilerInterface.run(CompilerInterface.scala:31) [error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [error] at java.lang.reflect.Method.invoke(Method.java:498) [error] at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237) [error] at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111) [error] at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90) [error] at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:82) [error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) [error] at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:133) [error] at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:73) [error] at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:116) [error] at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:307) [error] at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:307) [error] at sbt.internal.inc.Incremental$.doCompile(Incremental.scala:106) [error] at sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:87) [error] at sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:116) [error] at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:63) [error] at sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:89) [error] at sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:134) [error] at sbt.internal.inc.Incremental$.compile(Incremental.scala:80) [error] at sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:67) [error] at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:311) [error] at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:269) [error] at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:159) [error] at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:238) [error] at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:69) [error] at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1549) [error] at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1523) [error] at scala.Function1.$anonfun$compose$1(Function1.scala:44) [error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40) [error] at sbt.std.Transform$$anon$4.work(System.scala:67) [error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269) [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) [error] at sbt.Execute.work(Execute.scala:278) [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269) [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [error] at java.lang.Thread.run(Thread.java:748) [error] (coreJS / Test / compileIncremental) scala.reflect.internal.FatalError: [error] Unknown type: , [class scala.reflect.internal.Types$ErrorType$, class scala.reflect.internal.Types$ErrorType$] TypeRef? false [error] while compiling: ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] during phase: jscode [error] library version: version 2.13.0 [error] compiler version: version 2.13.0 [error] reconstructed args: -Xplugin:~/.ivy2/cache/org.scala-js/scalajs-compiler_2.13.0/jars/scalajs-compiler_2.13.0-0.6.28.jar -Xplugin:~/.ivy2/cache/org.typelevel/kind-projector_2.13/jars/kind-projector_2.13-0.10.3.jar -deprecation -language:higherKinds -language:implicitConversions -bootclasspath /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes:~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.0.jar -classpath ~/kittens/core/.js/target/scala-2.13/test-classes:~/kittens/core/.js/target/scala-2.13/classes:~/.ivy2/cache/org.scala-js/scalajs-library_2.13/jars/scalajs-library_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-core_2.13/jars/cats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-macros_2.13/jars/cats-macros_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/machinist_2.13/jars/machinist_2.13-0.6.8.jar:~/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.0.jar:~/.ivy2/cache/org.typelevel/cats-kernel_2.13/jars/cats-kernel_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/alleycats-core_2.13/jars/alleycats-core_2.13-2.0.0-M4.jar:~/.ivy2/cache/com.chuusai/shapeless_2.13/bundles/shapeless_2.13-2.3.3.jar:~/.ivy2/cache/org.scala-js/scalajs-test-interface_2.13/jars/scalajs-test-interface_2.13-0.6.28.jar:~/.ivy2/cache/org.typelevel/cats-testkit_2.13/jars/cats-testkit_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-laws_2.13/jars/cats-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.typelevel/cats-kernel-laws_2.13/jars/cats-kernel-laws_2.13-2.0.0-M4.jar:~/.ivy2/cache/org.scalacheck/scalacheck_2.13/jars/scalacheck_2.13-1.14.0.jar:~/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar:~/.ivy2/cache/org.typelevel/discipline-core_2.13/jars/discipline-core_2.13-0.12.0-M3.jar:~/.ivy2/cache/org.scalatest/scalatest_2.13/bundles/scalatest_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scalactic/scalactic_2.13/bundles/scalactic_2.13-3.1.0-SNAP13.jar:~/.ivy2/cache/org.scala-lang.modules/scala-xml_2.13/bundles/scala-xml_2.13-1.2.0.jar:~/.ivy2/cache/org.scalatestplus/scalatestplus-scalacheck_2.13/bundles/scalatestplus-scalacheck_2.13-1.0.0-SNAP8.jar:~/.ivy2/cache/org.typelevel/discipline-scalatest_2.13/jars/discipline-scalatest_2.13-0.12.0-M3.jar -unchecked -feature [error] [error] last tree to typer: TypeTree(class String) [error] tree position: line 93 of ~/kittens/core/src/test/scala/cats/derived/empty.scala [error] tree tpe: String [error] symbol: final class String in package lang [error] symbol definition: final class String extends Serializable with Comparable with CharSequence (a ClassSymbol) [error] symbol package: java.lang [error] symbol owners: class String [error] call site: object EmptySuite$Mask in package derived in package derived [error] [error] == Source file context for tree position == [error] [error] 90 [error] 91 trait Dummy [error] 92 final case class Chain(head: Int, tail: Chain) [error] 93 final case class Mask(bits: Int) [error] 94 object Mask { [error] 95 implicit val empty: Empty[Mask] = Empty(Mask(0xffffffff)) [error] 96 } [error] (coreJVM / Test / compileIncremental) Compilation failed [error] Total time: 5 s, completed Jun 26, 2019 12:42:12 AM ```

Expectation:

The code should not compile with a type error (implicit not found).

lrytz commented 5 years ago

cc @milessabin

xuwei-k commented 5 years ago

related or duplicate https://github.com/scala/bug/issues/11524 ? 🤔

joroKr21 commented 5 years ago

Ah yes you are right

milessabin commented 5 years ago

I'll keep this one actually ... I'll have an easier time reducing the kittens example.

milessabin commented 5 years ago

Minimized as,

object Test {
  class A
  class B

  implicit def mkA(implicit b: => B): A = ???
  implicit def mkB(implicit a: A, i: Int): B = ???

  implicitly[A]
}
milessabin commented 5 years ago

PR here: https://github.com/scala/scala/pull/8201.

Confirmed that it fixes the original Kittens issue: I was able to replace all the commented out printlns with illTyped and tests compiled and ran.