Skip to content

-Vprofile throw UnsupportedOperationException: empty.max in REPL #16003

Closed
@xuwei-k

Description

@xuwei-k

Compiler version

  • 3.2.0
  • 3.2.2-RC1-bin-20220907-a503b7a-NIGHTLY

Minimized code and output

$ scala -Vprofile     
Welcome to Scala 3.2.0 (11.0.16, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                                                                                                                                                            
scala> 2
Exception in thread "main" java.lang.UnsupportedOperationException: empty.max
	at scala.collection.IterableOnceOps.max(IterableOnce.scala:945)
	at scala.collection.IterableOnceOps.max$(IterableOnce.scala:943)
	at scala.collection.AbstractIterable.max(Iterable.scala:926)
	at dotty.tools.dotc.reporting.ActiveProfile.safeMax$1(Profile.scala:106)
	at dotty.tools.dotc.reporting.ActiveProfile.printAndAggregateSourceInfos$1(Profile.scala:109)
	at dotty.tools.dotc.reporting.ActiveProfile.printSummary(Profile.scala:146)
	at dotty.tools.dotc.Run.printSummary(Run.scala:334)
	at dotty.tools.repl.ReplCompiler.runCompilationUnit(ReplCompiler.scala:167)
	at dotty.tools.repl.ReplCompiler.compile(ReplCompiler.scala:177)
	at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:287)
	at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:249)
	at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:168)
	at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:192)
	at dotty.tools.repl.ReplDriver.runBody$$anonfun$1(ReplDriver.scala:180)
	at dotty.tools.runner.ScalaClassLoader$.asContext(ScalaClassLoader.scala:80)
	at dotty.tools.repl.ReplDriver.runBody(ReplDriver.scala:180)
	at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:133)
	at dotty.tools.repl.Main$.main(Main.scala:7)
	at dotty.tools.MainGenericRunner$.run$1(MainGenericRunner.scala:193)
	at dotty.tools.MainGenericRunner$.main(MainGenericRunner.scala:268)
	at dotty.tools.MainGenericRunner.main(MainGenericRunner.scala)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions