-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
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
22 changes: 22 additions & 0 deletions
22
core/src/test/scala_2.13+/shapeless/LabelledGenericTests213.scala
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,22 @@ | ||
package shapeless | ||
|
||
import org.junit.Assert._ | ||
import org.junit.Test | ||
import shapeless.ops.record.Selector | ||
|
||
class LabelledGenericTests213 { | ||
import LabelledGenericTests213._ | ||
|
||
@Test | ||
def testSelectorWithHkt(): Unit = { | ||
assertEquals(0, new Func[Hkt[Option]].select("foo")) | ||
assertEquals(0, new Func[Hkt[Id]].select("foo")) | ||
} | ||
} | ||
|
||
object LabelledGenericTests213 { | ||
case class Hkt[F[_]](foo: F[String]) | ||
class Func[T] { | ||
def select[R <: HList](k: Witness)(implicit gen: LabelledGeneric.Aux[T, R], selector: Selector[R, k.T]) = 0 | ||
} | ||
} |