Skip to content

Infinite compile time when exceeded amount of parameters of class #20134

Closed
@Nojipiz

Description

@Nojipiz

Compiler version

Scala: 3.3.3

Minimized code

  trait ExampleTrait1
  trait ExampleTrait2
  class ExampleClass(traitOne: ExampleTrait1, traitTwo: ExampleTrait2)

  def fun[In](a: In): Unit = println(0)

  fun(new ExampleClass(_, _, _))

Output

java.lang.OutOfMemoryError: Java heap space

Expectation

An error at compile time because the exceeded parameter of "ExampleClass", it just tries to compile until the java heap space is over.

Metadata

Metadata

Labels

area:inferitype:bugitype:compiler hangsIssues where the compiler hangs.regressionThis worked in a previous version but doesn't anymorestat:fixed in nextThe issue was fixed in Next and only still applies to LTS.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions