File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -3314,7 +3314,7 @@ object Parsers {
33143314 /** ContextTypes ::= FunArgType {‘,’ FunArgType}
33153315 */
33163316 def contextTypes (paramOwner : ParamOwner , numLeadParams : Int , impliedMods : Modifiers ): List [ValDef ] =
3317- val tps = commaSeparated(funArgType )
3317+ val tps = commaSeparated(() => paramTypeOf(toplevelTyp) )
33183318 var counter = numLeadParams
33193319 def nextIdx = { counter += 1 ; counter }
33203320 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