From 5dd5c8c873e0cd35aec44c2aef43711004a5b6bf Mon Sep 17 00:00:00 2001 From: McGizzle Date: Tue, 9 Jul 2019 11:24:55 +0100 Subject: [PATCH] tests showing it works for primitives --- .../test/scala/io/typechecked/alphabetsoup/MixerSpec.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/alphabet-soup/src/test/scala/io/typechecked/alphabetsoup/MixerSpec.scala b/alphabet-soup/src/test/scala/io/typechecked/alphabetsoup/MixerSpec.scala index afce7c9..17b05f9 100644 --- a/alphabet-soup/src/test/scala/io/typechecked/alphabetsoup/MixerSpec.scala +++ b/alphabet-soup/src/test/scala/io/typechecked/alphabetsoup/MixerSpec.scala @@ -37,10 +37,15 @@ class MixerSpec extends FlatSpec with Matchers { Mixer[A1, A1].mix(A1(5, "hello")) shouldBe A1(5, "hello") } + it should "select smaller type from larger for primitives" in { + implicitly[Mixer[(String, Int), Int]] + implicitly[Mixer[(String, Int), String]] + } + it should "select smaller type from larger for non-primitives" in { @Atomic class A - @Atomic class B + @Atomic class Bgit pendingUntilFixed{ "implicitly[Mixer[(A, B), B]]" should compile