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

Severe compiler error occurred (StackOverflowError) #6821

Open
povder opened this issue Oct 6, 2024 · 0 comments
Open

Severe compiler error occurred (StackOverflowError) #6821

povder opened this issue Oct 6, 2024 · 0 comments

Comments

@povder
Copy link

povder commented Oct 6, 2024

Describe the bug

When using the Iron newtype library (https://github.com/Iltotore/iron), when import io.github.iltotore.iron.* is present, a "sever compiler error" message is printed to the logs upon trying to trigger autocompletion after typing in a dot. The autocompletion then doesn't work.

I isolated the issue in the following repo: https://github.com/povder/metals-bug-01.

Scala version: 3.5.1

Steps to reproduce:

  1. Check out https://github.com/povder/metals-bug-01
  2. Import the project
  3. Navigate to Bug.scala, and in Bug object body type 1..

Report from the logs:

file:///src/main/scala/bug/Bug.scala

java.lang.StackOverflowError

occurred in the presentation compiler.

presentation compiler configuration:

action parameters:
offset: 48
uri: file:///src/main/scala/bug/Bug.scala
text:

package bug

import newtypes.*

object Bug {
 1.@@
}

Error stacktrace:

dotty.tools.dotc.core.TypeApplications$.tryReduce$1(TypeApplications.scala:401)
	dotty.tools.dotc.core.TypeApplications$.appliedTo$extension(TypeApplications.scala:418)
	dotty.tools.dotc.core.TypeApplications$.applyIfParameterized$extension(TypeApplications.scala:444)
	dotty.tools.dotc.core.Types$AppliedType.superType(Types.scala:4658)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:665)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:665)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
....
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:665)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:665)
	dotty.tools.dotc.core.Types$Type.isMatchableBound(Types.scala:667)

Short summary:

java.lang.StackOverflowError

Expected behavior

Autocompletion should trigger.

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

1.3.5+143-e6110753-SNAPSHOT

Extra context or search terms

iron 3.5.1

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

No branches or pull requests

1 participant