This works
def func(f: => Int) = f
This dosn't (inside class for example)
type EmptyFunct = => Int
or
type EmptyFunct = (=> Int)
Scala version 2.9 Two questions:
- Why dosn't syntax sugar work in second case?
- How to define this function without syntax sugar?
EmptyFunct
that shows why() => Unit
doesn't fit your need? – Annecy