Use working Scala syntax in method def