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

SuspendException in posttyper with -language:experimental.into #20332

Closed
propensive opened this issue May 4, 2024 · 0 comments
Closed

SuspendException in posttyper with -language:experimental.into #20332

propensive opened this issue May 4, 2024 · 0 comments
Labels
itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label

Comments

@propensive
Copy link
Contributor

propensive commented May 4, 2024

Compiler version

This issue is present in the latest main, and was introduced by 32f5a1747dbcc9a2f213b8bfcfa88865163ca43b (Compute non-experimental top-level definition from symbols, @nicolasstucki).

Minimized code

a.scala:

val value = opaques.x.get

b.scala:

import scala.quoted.*

trait Op:
  extension (left: opaques.X)
    def get: Any = ???

object opaques:
  opaque type X = Unit
  val x: X = ()

  def typeclass(using Quotes): Expr[Op] = '{???}

  object X:
    transparent inline given Op = ${typeclass}

Compile with:

> scalac -language:experimental.into a.scala b.scala

Output (click arrow to expand)

  unhandled exception while running posttyper on b.scala

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: b.scala
        during phase: posttyper
                mode: Mode(ImplicitsEnabled)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-32f5a17
            settings: -language List(experimental.into)

Exception in thread "main" dotty.tools.dotc.CompilationUnit$SuspendException

Note that this is the entire output: the exception is not actually show.

@propensive propensive added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label
Projects
None yet
Development

No branches or pull requests

1 participant