Skip to content

Commit 48283ca

Browse files
committed
SI-7767 avoid rejecting Scaladoc comments in early initializers
review by @retronym
1 parent 7fa0e60 commit 48283ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/scala/tools/nsc/ast/parser/Parsers.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,6 +2772,8 @@ self =>
27722772
List(copyValDef(vdef)(mods = mods | Flags.PRESUPER))
27732773
case tdef @ TypeDef(mods, name, tparams, rhs) =>
27742774
List(treeCopy.TypeDef(tdef, mods | Flags.PRESUPER, name, tparams, rhs))
2775+
case docdef @ DocDef(comm, rhs) =>
2776+
List(treeCopy.DocDef(docdef, comm, rhs))
27752777
case stat if !stat.isEmpty =>
27762778
syntaxError(stat.pos, "only type definitions and concrete field definitions allowed in early object initialization section", false)
27772779
List()

0 commit comments

Comments
 (0)