From 75e584bd0c056a39ea6ef52848e8c2cbe764cb3a Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 30 Mar 2012 11:42:40 -0700 Subject: Fix for regression with inference at arity 21+. A classic "off by two" error. Closes SI-4545, SI-5633. --- test/files/pos/t4545.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/files/pos/t4545.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t4545.scala b/test/files/pos/t4545.scala new file mode 100644 index 0000000000..8c7a3236c4 --- /dev/null +++ b/test/files/pos/t4545.scala @@ -0,0 +1,14 @@ +object Test { + def f[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](table: Tuple20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T])(fun: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Unit) { + } + def g[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](table: Tuple21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U])(fun: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => Unit) { + } + + def g20 = f( + ( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) + ) { case ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)) => () } + + def g21 = g( + (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) + ) { case ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)) => () } +} -- cgit v1.2.3