Scala's `new` syntax is an anomaly. I'd rather say `new[Foo](x, y, z)`, or just `new(x, y, z)` if `Foo` is the expected type.
@viktorklang @xeno_by `val x: Foo[String] = new Foo()` currently infers the type parameter nicely.
-
-
@propensive@xeno_by asInstanceOf doesn't have inference: scala> val s: String = ("": AnyRef).asInstanceOf java.lang.ClassCastException: … -
@viktorklang@xeno_by No, but it works in situations like this: https://gist.github.com/propensive/f0e5087ee960a7b42363 … - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.