*** empty log message ***
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@519 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
e8270287ce
commit
35287f549d
|
@ -1,21 +0,0 @@
|
|||
module test {
|
||||
|
||||
trait A { type T; }
|
||||
|
||||
trait B { type T; }
|
||||
|
||||
/** def functor(x: A): B { type T = x.T } */
|
||||
abstract class functor() {
|
||||
val arg: A;
|
||||
val res: B { type T = arg.T } =
|
||||
new B { type T = arg.T; };
|
||||
}
|
||||
|
||||
val a = new A { type T = String };
|
||||
/** val b: B { type T = String } = functor(a) */
|
||||
val b: B { type T = String } = {
|
||||
val tmp = new functor() { val arg = a };
|
||||
tmp.res
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
module test {
|
||||
|
||||
trait A { type T; }
|
||||
|
||||
trait B { type T; }
|
||||
|
||||
/** def functor(x: A): B { type T = x.T } */
|
||||
abstract class functor() {
|
||||
val arg: A;
|
||||
val res: B { type T = arg.T } =
|
||||
new B { type T = arg.T; };
|
||||
}
|
||||
|
||||
val a = new A { type T = String };
|
||||
/** val b: B { type T = String } = functor(a) */
|
||||
val b: B { type T = String } = {
|
||||
val tmp = new functor() { val arg = a };
|
||||
tmp.res
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue