aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Blanvillain <olivier.blanvillain@gmail.com>2016-09-16 10:35:56 +0200
committerOlivier Blanvillain <olivier.blanvillain@gmail.com>2016-09-16 10:45:27 +0200
commit61f7e085ff1c72eee2b61d708a887ee3a6778167 (patch)
tree42a5a42e6606f326bbd2576aa1642f67e0ab409c /tests
parent5450507c663bca565b2b61b8afb1073c991c9827 (diff)
downloaddotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.tar.gz
dotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.tar.bz2
dotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.zip
Fix corner case w types ALL passed by name & out of order
This commit removes a problematic duplicated `checkBounds` call on `TypeApply`. To verify correctness of this change on has to check that `normalizeTree` used only once [1], and the function using `normalizeTree` already takes care of calling `checkBounds`. [1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/t1513b.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/pos/t1513b.scala b/tests/pos/t1513b.scala
index 881187be0..546649383 100644
--- a/tests/pos/t1513b.scala
+++ b/tests/pos/t1513b.scala
@@ -1,5 +1,9 @@
object Test {
- def f[T1 <: String, T2 <: Int, T3 <: Boolean](a1: T1, a2: T2, a3: T3) = ()
+ def f[
+ T1 <: String,
+ T2 <: Int,
+ T3 <: Boolean
+ ](a1: T1, a2: T2, a3: T3) = ()
f ("", 1, true)
f[T1 = String] ("", 1, true)
@@ -12,5 +16,10 @@ object Test {
f[T3 = Boolean, T2 = Int] ("", 1, true)
f[T3 = Boolean, T1 = String] ("", 1, true)
f[T1 = String, T2 = Int, T3 = Boolean]("", 1, true)
+ f[T1 = String, T3 = Boolean, T2 = Int] ("", 1, true)
+ f[T2 = Int, T1 = String, T3 = Boolean]("", 1, true)
+ f[T2 = Int, T3 = Boolean, T1 = String] ("", 1, true)
+ f[T3 = Boolean, T1 = String, T2 = Int] ("", 1, true)
+ f[T3 = Boolean, T2 = Int, T1 = String] ("", 1, true)
f[String, Int, Boolean] ("", 1, true)
}