com.thoughtworks.dsl.keywords
杨博 (Yang Bo)
This Yield keyword must be put inside a function that returns Seq[Element] or Seq[Element] !! ..., or it will not compile.
Yield
Seq[Element]
Seq[Element] !! ...
"def f(): Int = !Yield(1)" shouldNot compile
An alias to cpsApply.
(yield: Yield[Yield[Element]]).apply(handler)(dsl)
(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 returnsSeq[Element]
orSeq[Element] !! ...
, or it will not compile."def f(): Int = !Yield(1)" shouldNot compile