Skip to content
Browse files

SI-7767 avoid rejecting Scaladoc comments in early initializers

review by @retronym
  • Loading branch information...
1 parent 7fa0e60 commit 48283ca80c17b2814a27464c30bca2445ffcc7a5 @huitseeker huitseeker committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
View
2 src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -2772,6 +2772,8 @@ self =>
List(copyValDef(vdef)(mods = mods | Flags.PRESUPER))
case tdef @ TypeDef(mods, name, tparams, rhs) =>
List(treeCopy.TypeDef(tdef, mods | Flags.PRESUPER, name, tparams, rhs))
+ case docdef @ DocDef(comm, rhs) =>
+ List(treeCopy.DocDef(docdef, comm, rhs))
case stat if !stat.isEmpty =>
syntaxError(stat.pos, "only type definitions and concrete field definitions allowed in early object initialization section", false)
List()

0 comments on commit 48283ca

Please sign in to comment.
Something went wrong with that request. Please try again.