You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectEnumTest:@main
defrun():Unit=tryenumColor:caseRed, Green, Bluedefpaint(color: Color):Unit=
println(s"painting with color $color")
paint(Color.Red)
catchcase e => println(e)
Output
java.lang.StackOverflowError
Expectation
painting with color Red
after defining and using an enum inside a function, when the function is ran, it produces a StackOverflowError. if the enum is defined outside of the function, then everything works.
The text was updated successfully, but these errors were encountered:
Minimized code
Output
java.lang.StackOverflowError
Expectation
after defining and using an enum inside a function, when the function is ran, it produces a StackOverflowError. if the enum is defined outside of the function, then everything works.
The text was updated successfully, but these errors were encountered: