diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-02-20 08:03:12 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-02-20 08:03:12 +1000 |
commit | cbdb95f9cd266beba3640368548a413690c40b8d (patch) | |
tree | b1fa54a9975e791bfd967a80e7d291aaadee6195 /test | |
parent | b6cbee9d81320524aa2e8a3d80dbf2062dd43fd2 (diff) | |
download | scala-cbdb95f9cd266beba3640368548a413690c40b8d.tar.gz scala-cbdb95f9cd266beba3640368548a413690c40b8d.tar.bz2 scala-cbdb95f9cd266beba3640368548a413690c40b8d.zip |
SI-8801 Another test for fixed exponential-time compilation
Turns out that SI-9157 was a duplicate of SI-8801. This commit
adds Paul's test, whose compile time is now back in the troposphere.
% time qscalac test/files/pos/t8801.scala
real 0m1.294s
user 0m3.978s
sys 0m0.240s
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t8801.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/t8801.scala b/test/files/pos/t8801.scala new file mode 100644 index 0000000000..695b456e12 --- /dev/null +++ b/test/files/pos/t8801.scala @@ -0,0 +1,21 @@ +sealed trait Nat { + type Prev <: Nat { type Succ = Nat.this.type } + type Succ <: Nat { type Prev = Nat.this.type } +} + +object Nat { + object Zero extends Nat { + type Prev = Nothing + } + + type _0 = Zero.type + type _1 = _0#Succ + type _2 = _1#Succ + type _3 = _2#Succ + type _4 = _3#Succ + type _5 = _4#Succ + type _6 = _5#Succ + type _7 = _6#Succ + type _8 = _7#Succ + type _9 = _8#Succ +} |