Skip to content

Commit

Permalink
Compile docs against both Scala 2.12 and 2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ruippeixotog committed Jan 22, 2020
1 parent e0599e1 commit 69e37a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/build.sbt
@@ -1 +1 @@
crossScalaVersions ~= { oldVersions => oldVersions.filter(_.startsWith("2.12")) }
crossScalaVersions ~= { oldVersions => oldVersions.filterNot(_.startsWith("2.11")) }
8 changes: 4 additions & 4 deletions docs/docs/docs/complex-types.md
Expand Up @@ -147,7 +147,7 @@ import shapeless._
import shapeless.labelled._

// create the singleton idw for the field id
val idw = Witness('id)
val idw = Witness(Symbol("id"))

implicit val class1Generic = new LabelledGeneric[Class1] {
// the generic representation of Class1 is the field id of type String
Expand All @@ -159,7 +159,7 @@ implicit val class1Generic = new LabelledGeneric[Class1] {
}

// create the singleton valuew for the field value
val valuew = Witness('value)
val valuew = Witness(Symbol("value"))

implicit val class2Generic = new LabelledGeneric[Class2] {
// the generic representation of Class2 is the fields id of type String and value of type Int
Expand Down Expand Up @@ -191,8 +191,8 @@ The second and final part of this method is to add the generic representation of
as a sealed family of `Class1` and `Class2`, or a coproduct of them if you want:

```scala mdoc:silent
val class1w = Witness('Class1)
val class2w = Witness('Class2)
val class1w = Witness(Symbol("Class1"))
val class2w = Witness(Symbol("Class2"))

implicit val identifiableGeneric = new LabelledGeneric[Identifiable] {
override type Repr =
Expand Down

0 comments on commit 69e37a2

Please sign in to comment.