File tree 2 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/parsing
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -3270,7 +3270,7 @@ object Parsers {
3270
3270
/** ContextTypes ::= FunArgType {‘,’ FunArgType}
3271
3271
*/
3272
3272
def contextTypes (paramOwner : ParamOwner , numLeadParams : Int , impliedMods : Modifiers ): List [ValDef ] =
3273
- val tps = commaSeparated(funArgType )
3273
+ val tps = commaSeparated(() => paramTypeOf(toplevelTyp) )
3274
3274
var counter = numLeadParams
3275
3275
def nextIdx = { counter += 1 ; counter }
3276
3276
val paramFlags = if paramOwner.isClass then LocalParamAccessor else Param
Original file line number Diff line number Diff line change
1
+
2
+ def f (using ? ): Unit = {} // error: unbound wildcard type
3
+ class C (using ? ) {} // error: unbound wildcard type
4
+
5
+ def f2 (using => ? ): Unit = {} // error: unbound wildcard type
6
+ class C2 (using => ? ) {} // error: unbound wildcard type
7
+
8
+ def f3 (using ? * ): Unit = {} // error: unbound wildcard type // error
9
+ class C3 (using ? * ) {} // error: unbound wildcard type // error
10
+
11
+ def g (using x : ? ): Unit = {} // error: unbound wildcard type
12
+ class D (using x : ? ) {} // error: unbound wildcard type
13
+
14
+ val h : (? ) ?=> Unit = ??? // ok, but useless (it's a function from Nothing)
You can’t perform that action at this time.
0 commit comments