From b9785280a7138a2bb52060faf94807aa0d07dec1 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 24 Aug 2011 17:11:55 +0000 Subject: Renamed tests named bugXXX to tXXX, no review. --- test/files/neg/t608.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/files/neg/t608.scala (limited to 'test/files/neg/t608.scala') diff --git a/test/files/neg/t608.scala b/test/files/neg/t608.scala new file mode 100644 index 0000000000..34dc4c0352 --- /dev/null +++ b/test/files/neg/t608.scala @@ -0,0 +1,17 @@ +trait CrashDueToTypeError { + def id[a](x :a) :a = x + + trait Bifunctor { + type a; // content + type s <: Bifunctor + + // uncomment this-vvvvvvvvvvvvvvvvvvvvvvvvvvvv, and it compiles + def bimap[c](f :a=>c) :s{/*type s=Bifunctor.this.s;*/type a=c; } + } + + def hylo[hs <: Bifunctor,ha,hb,hc] + (f :hb=>hs{type s=hs; type a=ha}, + g :hs{type s=hs; type a=ha}=>hc)(x :hb) + :hc + = g(f(x).bimap(id)) +} -- cgit v1.2.3