|
Scala example source code file (t0528.scala)
The Scala t0528.scala source codetrait Sequ[A] { def toArray: Array[T forSome {type T <: A}] } class RichStr extends Sequ[Char] { // override to a primitive array def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') } object Test extends App { val x: RichStr = new RichStr println((x: Sequ[Char]).toArray.deep) // calling through the bridge misses unboxing } Other Scala examples (source code examples)Here is a short list of links related to this Scala t0528.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.