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 {
384
384
sym.setFlag(Private ) // break the overriding relationship by making sym Private
385
385
}
386
386
checkApplicable(UnusedType , ! sym.is(UnusedType ))
387
- if (sym.is(Unused )) {
387
+ if (sym.is(Unused ))
388
388
checkApplicable(Unused , ! sym.is(MutableOrLazy ))
389
- if (sym.info.widen.finalResultType.isBottomType)
390
- fail(" unused " + sym.showKind + " cannot have type Nothing" )
391
- }
392
389
}
393
390
394
391
/** 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 {
2
2
3
3
def main (args : Array [String ]): Unit = {
4
4
5
- unused def !!! : Null = ???
5
+ unused def !!! : Nothing = ???
6
6
7
7
try {
8
8
fun(!!! )
@@ -12,7 +12,7 @@ object Test {
12
12
}
13
13
}
14
14
15
- def fun (unused bottom : Null ): Unit = {
15
+ def fun (unused bottom : Nothing ): Unit = {
16
16
println(" fun" )
17
17
}
18
18
}
You can’t perform that action at this time.
0 commit comments