Skip to content

Commit 17cd615

Browse files
adamkopecpivovarit
authored andcommitted
Fix: Missing javadocs for types in For comprehensions
1 parent 8c53086 commit 17cd615

File tree

2 files changed

+331
-0
lines changed

2 files changed

+331
-0
lines changed

vavr/generator/Generator.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,10 +948,17 @@ def generateMainClasses(): Unit = {
948948
case 2 => BiFunctionType
949949
case _ => s"Function$i"
950950
}
951+
952+
val parameterDoc = (if (monadicTypesThatNeedParameter.contains(mtype)) {
953+
s"\n* @param <L> The left-hand type of all {@link $mtype}s"
954+
} else { "" })
955+
val typeDocs = (1 to i).gen(j => s"* @param <T$j> component type of {@link $mtype} number $j\n")
951956
val args = (1 to i).gen(j => s"? super T$j")(", ")
952957
xs"""
953958
/$javadoc
954959
* For-comprehension with ${i.numerus(mtype)}.
960+
$parameterDoc
961+
$typeDocs
955962
*/
956963
public static class $forClassName<$generics> {
957964

0 commit comments

Comments
 (0)