diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-10-18 07:22:58 -0700 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-10-18 07:22:58 -0700 |
commit | 54707cb45018170e31eb188a9a694ab9b0728f71 (patch) | |
tree | fae843355f051d9aed9b223ecf18c28bee63ecd9 /test/files/pos/t5845.scala | |
parent | 5b2c4644a23ffbe1c45df40bf3511aee71eb0fe2 (diff) | |
parent | 210dbc7887bc42eed4154de65d0ff5f46ca5ee58 (diff) | |
download | scala-54707cb45018170e31eb188a9a694ab9b0728f71.tar.gz scala-54707cb45018170e31eb188a9a694ab9b0728f71.tar.bz2 scala-54707cb45018170e31eb188a9a694ab9b0728f71.zip |
Merge pull request #3030 from xeno-by/topic/fundep-views
SI-3346 implicit parameters can now guide implicit view inference
Diffstat (limited to 'test/files/pos/t5845.scala')
-rw-r--r-- | test/files/pos/t5845.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/t5845.scala b/test/files/pos/t5845.scala new file mode 100644 index 0000000000..823c722c14 --- /dev/null +++ b/test/files/pos/t5845.scala @@ -0,0 +1,16 @@ +class Num[T] { + def mkOps = new Ops + class Ops { def +++(rhs: T) = () } +} + +class A { + implicit def infixOps[T, CC[X] <: Num[X]](lhs: T)(implicit num: CC[T]) = num.mkOps + implicit val n1 = new Num[Int] { } + println(5 +++ 5) +} + +class B { + implicit def infixOps[T, CC[X] <: Num[X]](lhs: T)(implicit num: CC[T]) : CC[T]#Ops = num.mkOps + implicit val n1 = new Num[Int] {} + println(5 +++ 5) +} |