-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9114 from forketyfork/bug/11101
Fixed scaladoc error on processing of incorrect comment placeholder
- Loading branch information
Showing
4 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package scaladoc.resources | ||
|
||
trait T { | ||
|
||
/** $a */ | ||
def foo: Int | ||
|
||
} | ||
|
||
object O extends T { | ||
|
||
val foo = 42 | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
newSource:5: warning: Variable a undefined in comment for value foo in object O | ||
/** $a */ | ||
^ | ||
Done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import scala.tools.nsc.doc.model._ | ||
import scala.tools.partest.ScaladocModelTest | ||
|
||
object Test extends ScaladocModelTest { | ||
|
||
override def resourceFile = "stray-dollar-sign-res.scala" | ||
|
||
def scaladocSettings = "" | ||
|
||
def testModel(rootPackage: Package) = { | ||
// get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s)) | ||
import access._ | ||
|
||
val comment = rootPackage._package("scaladoc")._package("resources")._object("O")._value("foo").comment | ||
assert(extractCommentText(comment.get) == "$a") | ||
} | ||
} |