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

(using ?) causes internal error in the incremental compiler #19364

Closed
sasha2048 opened this issue Jan 3, 2024 · 3 comments · Fixed by #19459
Closed

(using ?) causes internal error in the incremental compiler #19364

sasha2048 opened this issue Jan 3, 2024 · 3 comments · Fixed by #19459
Assignees
Milestone

Comments

@sasha2048
Copy link

Compiler version

3.4.0-RC1

Minimized code

def f(using ?): Unit = {}

Output

C:\somepath> sbt clean
[info] welcome to sbt 1.9.7 (Eclipse Adoptium Java 11.0.21)
[info] loading project definition from C:\somepath\project
[info] loading settings for project root from build.sbt ...
[info] set current project to err (in build file:/C:/somepath/)
[success] Total time: 0 s, completed 3 січ. 2024 р., 18:45:09
C:\somepath> sbt compile
[info] welcome to sbt 1.9.7 (Eclipse Adoptium Java 11.0.21)
[info] loading project definition from C:\somepath\project
[info] loading settings for project root from build.sbt ...
[info] set current project to err (in build file:/C:/somepath/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] compiling 1 Scala source to C:\somepath\target\scala-3.4.0-RC1\classes ...
[error] Internal error in the incremental compiler while compiling C:\somepath\src\main\scala\Main.scala: Unhandled type  of class class dotty.tools.dotc.core.Types$RealTypeBounds
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 3 s, completed 3 січ. 2024 р., 18:45:28

Expectation

A meaningful error message.

@sasha2048 sasha2048 added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 3, 2024
@nicolasstucki nicolasstucki added area:sbt-bridge and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 9, 2024
@nicolasstucki
Copy link
Contributor

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Jan 9, 2024

This code currently compiles, but it should probably fail while typing.

The definition is typed as

   def f(using x$1:  >: Nothing <: Any): Unit =
      {
        ()
      }

and it does fail Ycheck after typer.

@bishabosha
Copy link
Member

similar to #18649

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

Successfully merging a pull request may close this issue.

5 participants