com.thoughtworks.dsl.keywords
杨博 (Yang Bo)
This Yield keyword must be put inside a function that returns Stream[Element] or Raii[Stream[Element]], or it will not compile.
Yield
Stream[Element]
Raii[Stream[Element]]
"def f(): Unit = !Yield(1)" shouldNot compile
(yield: Yield[Yield[Element]]).cpsApply(handler)(dsl)
(yield: Yield[Yield[Element]]).element
(yield: Yield[Yield[Element]]).unary_!
Author:
杨博 (Yang Bo)
This
Yield
keyword must be put inside a function that returnsStream[Element]
orRaii[Stream[Element]]
, or it will not compile."def f(): Unit = !Yield(1)" shouldNot compile