Skip to content

Missing warning for Infinite recursive call in object #23277

Open
@drewfeelsblue

Description

@drewfeelsblue

Compiler version

3.7.0

reproduced also for nightly version (currently 3.7.2-RC1-bin-20250527-2703b6b-NIGHTLY)

Minimized code

//> using scala 3.7.0

enum Test:
  case One
  case Two(i: Int)

object Test:
  object Two:
    def apply(i: Int): Test.Two = Test.Two(i)


object app extends App:
  Test.Two(1)

Output

run of above code snippet leads to "lock" (execution is stuck)

Expectation

I expected to see at least compiler warning for such code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions