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
case class Foo(s: String) {}
object Lib {
def h1 = Foo("Hello")
val h2 = Foo("World")
}
it's kind of verbose/repetitive to require def h1: Foo = Foo("Hello").
That said, if Foo stops being a case class, needing to update call sites is kind of annoying.
Maybe we should also allow inferring generally constructor or apply calls where the public return type of the apply is the same as the name of the type...
The text was updated successfully, but these errors were encountered:
In this code:
it's kind of verbose/repetitive to require
def h1: Foo = Foo("Hello")
.That said, if
Foo
stops being a case class, needing to update call sites is kind of annoying.Maybe we should also allow inferring generally constructor or apply calls where the public return type of the apply is the same as the name of the type...
The text was updated successfully, but these errors were encountered: