diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-19 16:04:29 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-19 16:04:29 -0800 |
commit | 18870094f2464e39067baeea71c4ae7ab8dfc6d9 (patch) | |
tree | 34bd87e14903966d8efc11950f8450be61bf4f20 /test/files | |
parent | a3a794fc3ba7128342310517da43e1ec143f85bd (diff) | |
parent | cbdb95f9cd266beba3640368548a413690c40b8d (diff) | |
download | scala-18870094f2464e39067baeea71c4ae7ab8dfc6d9.tar.gz scala-18870094f2464e39067baeea71c4ae7ab8dfc6d9.tar.bz2 scala-18870094f2464e39067baeea71c4ae7ab8dfc6d9.zip |
Merge pull request #4347 from retronym/ticket/8801
SI-8801 Another test for fixed exponential-time compilation
Diffstat (limited to 'test/files')
-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 +} |