File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
compiler/src/dotty/tools/dotc/typer
tests/pos/_typeInterweaving Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -1085,8 +1085,8 @@ trait Applications extends Compatibility {
1085
1085
val typedArgs = if (isNamed) typedNamedArgs(tree.args) else tree.args.mapconserve(typedType(_))
1086
1086
record(" typedTypeApply" )
1087
1087
typedExpr(tree.fun, PolyProto (typedArgs, pt)) match {
1088
- case _ : TypeApply if ! ctx.isAfterTyper =>
1089
- errorTree(tree, " illegal repeated type application" )
1088
+ /* case _: TypeApply if !ctx.isAfterTyper => //TODO: assess removing this is okay
1089
+ errorTree(tree, "illegal repeated type application") */
1090
1090
case typedFn =>
1091
1091
typedFn.tpe.widen match {
1092
1092
case pt : PolyType =>
Original file line number Diff line number Diff line change
1
+ def f_4 [T ]: [U ] => T => T = ???
2
+ def f_3 [T ][U ]: T => T = ???
3
+ def f_2 [T ][U ](): T => T = ???
4
+ def f_1 [T <: Int ][U <: String ](): T => T = ???
5
+ def f0 [T <: Int ][U <: String ]: T => T = ???
6
+ def f1 [T <: Int ][U <: String ]: [X <: Unit ] => X => X = ???
7
+ def f2 [T <: Int ][U <: String ](): [X <: Unit ] => X => X = ???
8
+ def f3 [T <: Int ][U <: String ]()[X <: Unit ]: X => X = ???
9
+
10
+ @ main def test = {
11
+ f_4[Int ][String ] // only one that works when lines 1088 to 1089 of Applications.scala are uncommented
12
+ f_3[Int ][String ]
13
+ f_2[Int ][String ]()
14
+ f_1[Int ][String ]()
15
+ f0[Int ][String ]
16
+ f1[Int ][String ]
17
+ f1[Int ][Unit ]
18
+ f1[Int ][String ][Unit ]
19
+ f2[Int ]()[Unit ]
20
+ f3[Int ]()[Unit ]
21
+ }
You can’t perform that action at this time.
0 commit comments