|
Scala example source code file (t3866.scala)
The Scala t3866.scala source codeabstract class ImplicitRepeated { trait T[+A, +B] trait X def f[N, R <: List[_]](elems: T[N, R]*) // alternative a) def f[N, R <: List[_]](props: String, elems: T[N, R]*) // alternative b) // the following implicit causes "cannot be applied" errors implicit def xToRight(r: X): T[Nothing, X] = null implicit def anyToN[N](x: N): T[N, Nothing] = null f("A", 1, 2) // should be implicitly resolved to alternative b) f( 1, 2 ) // should be implicitly resolved to alternative a) // ImplicitRepeated.this.f[Int, Nothing]("A", ImplicitRepeated.this.anyToN[Int](1), ImplicitRepeated.this.anyToN[Int](2)); // ImplicitRepeated.this.f[Int, Nothing](ImplicitRepeated.this.anyToN[Int](1), ImplicitRepeated.this.anyToN[Int](2)) } Other Scala examples (source code examples)Here is a short list of links related to this Scala t3866.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.