Skip to content

Compiler crashes with Inconsistent state in TS assertion #12839

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

Closed
vpatryshev opened this issue Jun 16, 2021 · 2 comments
Closed

Compiler crashes with Inconsistent state in TS assertion #12839

vpatryshev opened this issue Jun 16, 2021 · 2 comments

Comments

@vpatryshev
Copy link

Compiler version

3.0.1-RC1

Minimized code

class Sample {
  def sample: Unit = {
    def set: Set[X] = ???
    val list: List[X] = Nil
    for { _ <- set } yield list.toMap
  }
}

Output (click arrow to expand)

Vlad4087688721:Categories vpatryshev$ sbt "clean;compile" > err.log 2>&1
Vlad4087688721:Categories vpatryshev$ ls -l err.log
-rw-r--r--  1 vpatryshev  staff  24908 Jun 15 21:11 err.log
Vlad4087688721:Categories vpatryshev$ less err.log





















[error]         at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2319)
[error]         at sbt.internal.io.Retry$.apply(Retry.scala:46)
[error]         at sbt.internal.io.Retry$.apply(Retry.scala:28)
[error]         at sbt.internal.io.Retry$.apply(Retry.scala:23)
[error]         at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error]         at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2315)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:834)
[error] (scala3 / Compile / compileIncremental) java.lang.AssertionError: assertion failed: Inconsistent state in TS[10X, 2, 1, 0]: it owns TypeVar(TypeParamRef(K)) whose owningState is TS[2, 1, 0]
[error] Total time: 4 s, completed Jun 15, 2021, 9:11:59 PM
@griggt
Copy link
Contributor

griggt commented Jun 16, 2021

Duplicate of #12736. Fixed by #12827.

@griggt griggt closed this as completed Jun 16, 2021
@vpatryshev
Copy link
Author

@som-snytt absolutely anything. I just minimized the code.

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

No branches or pull requests

2 participants