April 29, 2015 Returning the "Current" Type in Scala A common question on the #scala IRC channel is I have a type hierarchy ⦠how do I declare a supertype method that returns the âcurrentâ type? This question comes up a lot because Scala encourages immutability, so methods that return a modified copy of this are quite common. Making the return type of such methods sufficiently precise is tricky, a
{{#tags}}- {{label}}
{{/tags}}