File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1922,7 +1922,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
19221922 NoType
19231923 }
19241924
1925- pt match {
1925+ pt.stripNull() match {
19261926 case pt : TypeVar
19271927 if untpd.isFunctionWithUnknownParamType(tree) && ! calleeType.exists =>
19281928 // try to instantiate `pt` if this is possible. If it does not
Original file line number Diff line number Diff line change @@ -13,4 +13,7 @@ class DispatchQuery:
1313trait Result
1414def getAll (nameFilter : Option [String => Boolean ]): List [Result ] = ???
1515def get (collectionName : String ): List [Result ] =
16- getAll(Option (_.startsWith(collectionName)))
16+ getAll(Option (_.startsWith(collectionName)))
17+
18+ def f [T ](x : T | Null ): T = ???
19+ val _: Any => Any = f(x => x)
You can’t perform that action at this time.
0 commit comments