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?
EmptyFunctthat shows why() => Unitdoesn't fit your need?