Commit 4e91211
authored
Do not search contextual function type in union types in general (#24393)
Being not able to assign `null` to `((a: String) ?=> Int) | Null` seems
weird to me.
The example is from
https://users.scala-lang.org/t/type-a-parameter-as-either-a-contextual-function-nullFile tree
2 files changed
+12
-1
lines changed- compiler/src/dotty/tools/dotc/core
- tests/explicit-nulls/pos
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2002 | 2002 | | |
2003 | 2003 | | |
2004 | 2004 | | |
2005 | | - | |
| 2005 | + | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | 2008 | | |
2009 | 2009 | | |
| 2010 | + | |
| 2011 | + | |
2010 | 2012 | | |
2011 | 2013 | | |
2012 | 2014 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments