|
Scala example source code file (t2416.scala)
The Scala t2416.scala source code
object t2416a {
trait A[X <: Double] { type B = X }
def x : A[Int]#B = 10 // no you won't
}
object t2416b {
trait A{type B[Y <: Double] = Int}
def x : A#B[Boolean] = 10 // seriously?
}
object t2416c {
trait A{type B[Z <: Double] = Int}
type C[Z <: A] = Z#B[String] // nuh-uh!
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala t2416.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.