diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 16:40:25 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 16:45:47 +0100 |
commit | 9df2dcc58439cf75420da68d4e6d9bb5504aabb4 (patch) | |
tree | 79b450ad0c15c6499ddaaaa3c226a394d37fdba4 /test/files | |
parent | a8122413c0cf2e51cdfd32c0450b91910f8a8cc2 (diff) | |
download | scala-9df2dcc58439cf75420da68d4e6d9bb5504aabb4.tar.gz scala-9df2dcc58439cf75420da68d4e6d9bb5504aabb4.tar.bz2 scala-9df2dcc58439cf75420da68d4e6d9bb5504aabb4.zip |
[nomaster] SI-8152 Backport variance validator performance fix
% time qbin/scalac test/files/pos/t8146-performance.scala
real 0m2.015s
user 0m2.892s
sys 0m0.215s
% time scalac-hash v2.10.3 test/files/pos/t8146-performance.scala
real 1m13.652s
user 1m14.245s
sys 0m0.508s
Cherry-picks one hunk from 882f8e64.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t8152-performance.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/t8152-performance.scala b/test/files/pos/t8152-performance.scala new file mode 100644 index 0000000000..b6d2ecd823 --- /dev/null +++ b/test/files/pos/t8152-performance.scala @@ -0,0 +1,13 @@ +class HListBench { + + class A[H, T] + + type B[H, T] = A[H, T] + + // was okay + type T1 = A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, A[Int, Nothing]]]]]]]]]]]]]]]]]]]]]]]]]]]] + + // Took over a minute to validate variance in 2.10.3! + type T2 = B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, B[Int, Nothing]]]]]]]]]]]]]]]]]]]]]]]]]]]] + +}
\ No newline at end of file |