Skip to content

Commit

Permalink
Merge pull request #206 from valencik/test-with-literal
Browse files Browse the repository at this point in the history
Add test with returned literal type
  • Loading branch information
olafurpg authored Nov 12, 2019
2 parents ad296a6 + e06668f commit fed7c5d
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,20 @@ class LiteralTypesSuite extends BaseMarkdownSuite {
""".stripMargin
)

check(
"narrowing",
"""
|```scala mdoc
|def narrower[T <: Singleton](t: T): T {} = t
|narrower(42)
|```
""".stripMargin,
"""|```scala
|def narrower[T <: Singleton](t: T): T {} = t
|narrower(42)
|// res0: 42 = 42
|```
""".stripMargin
)

}

0 comments on commit fed7c5d

Please sign in to comment.