Skip to content

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

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

Closed
xuwei-k opened this issue Sep 9, 2022 · 0 comments · Fixed by #16007
Closed

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

xuwei-k opened this issue Sep 9, 2022 · 0 comments · Fixed by #16007
Labels
itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label

Comments

@xuwei-k
Copy link
Contributor

xuwei-k commented Sep 9, 2022

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)
@xuwei-k xuwei-k added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 9, 2022
odersky added a commit to dotty-staging/dotty that referenced this issue Sep 9, 2022
odersky added a commit that referenced this issue Sep 10, 2022
mpollmeier pushed a commit to mpollmeier/dotty that referenced this issue Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant