Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes the backticks in use case signature crash
Suggested by Simon in https://groups.google.com/forum/?hl=en&fromgroups#!topic/scala-internals/z7s1CCRCz74 Now it eliminates backticks and gracefully bails out with an error message when it can't remove the wiki syntax.
- Loading branch information
1 parent
00b22ed
commit b6e989f
Showing
3 changed files
with
50 additions
and
5 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
newSource:8: error: Incorrect variable expansion for $Coll in use case. Does the variable expand to wiki syntax when documenting class Test2? | |||
* @usecase def foo: $Coll[T] | |||
^ | |||
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
import scala.tools.nsc.doc.model._ | |||
import scala.tools.partest.ScaladocModelTest | |||
import language._ | |||
|
|||
object Test extends ScaladocModelTest { | |||
|
|||
override def code = """ | |||
/** | |||
* @define Coll `Test` | |||
*/ | |||
class Test[T] { | |||
/** | |||
* member $Coll | |||
* @usecase def foo: $Coll[T] | |||
* usecase $Coll | |||
*/ | |||
def foo(implicit err: String): Test[T] = sys.error(err) | |||
} | |||
/** @define Coll {{{some `really` < !! >> invalid $$$ thing}}} */ | |||
class Test2[T] extends Test[Int] | |||
""" | |||
|
|||
def scaladocSettings = "" | |||
def testModel(root: Package) = () | |||
} |