|
Scala example source code file (bug1381.scala)
The Scala bug1381.scala source code
import scala.reflect.Manifest
class D[V <: Variable]
class ID[V<:IV] extends D[V] {
type E = V#ValueType
def index(value:E) : Int = 0
// Comment this out to eliminate crash. Or see below
def index(values:E*) : Iterable[Int] = null
}
abstract class Variable {
type VT <: Variable
def d : D[VT] = null
}
abstract class PV[T](initval:T) extends Variable {
type VT <: PV[T]
type ValueType = T
}
trait IV extends Variable {
type ValueType
}
abstract class EV[T](initval:T) extends PV[T](initval) with IV {
type VT <: EV[T]
override def d : ID[VT] = null
// Comment this out to eliminate crash
protected var indx = d.index(initval)
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala bug1381.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.