File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -384,11 +384,8 @@ object Checking {
384384 sym.setFlag(Private ) // break the overriding relationship by making sym Private
385385 }
386386 checkApplicable(UnusedType , ! sym.is(UnusedType ))
387- if (sym.is(Unused )) {
387+ if (sym.is(Unused ))
388388 checkApplicable(Unused , ! sym.is(MutableOrLazy ))
389- if (sym.info.widen.finalResultType.isBottomType)
390- fail(" unused " + sym.showKind + " cannot have type Nothing" )
391- }
392389 }
393390
394391 /** Check the type signature of the symbol `M` defined by `tree` does not refer
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ object Test {
22
33 def main (args : Array [String ]): Unit = {
44
5- unused def !!! : Null = ???
5+ unused def !!! : Nothing = ???
66
77 try {
88 fun(!!! )
@@ -12,7 +12,7 @@ object Test {
1212 }
1313 }
1414
15- def fun (unused bottom : Null ): Unit = {
15+ def fun (unused bottom : Nothing ): Unit = {
1616 println(" fun" )
1717 }
1818}
You can’t perform that action at this time.
0 commit comments