Is it possible to parameterize one or more traits for mixing? My example below doesn't compile, but IntelliJ's intellisense does actually come up with the correct types.
class Student
class Students[A <: Student] {
def create = new Student with A
}
trait Major extends Student
trait Dormitory extends Student
trait Fraternity extends Student
val onCampus = new Students[Major with Dormitory]
val fratBoys = new Students[Major with Fraternity]
onCampus.create // is a: Student with Major with Dormitory
fratBoys.create // is a: Student with Major with Fraternity