Given the generic register method below I would like to define the := operator as a symbolic alias.

def register[Prop <: Property[_]](prop: Prop): Prop

@inline
final def :=[Prop <: Property[_]] = register[Prop] _

Originally I wanted to write something like this:

val := = register _

But that gives me the function signature Nothing => Nothing. My next attempt was to parameterize it with the type Prop but that apparently works only if I make it a def, which can take type parameters and pass them onwards.

Ideally I would like to omit the @inline annotation but I am not sure what object code the Scala compiler makes out of it.

Most important my goal is it not to have the := method duplicate all parts of the register method's signature except for the name and then simply let the former delegate to the latter.

Edit
Report