Closed knocte closed 10 months ago
Mmm, unfortunately, even with a return
keyword, the possible subsequent LOC after it that has another return
keyword might still not be flagged as unreachable by F# compiler (TODO: file bug?). So the idea here would be that this rule detects both the absence of return
keyword and/or unreachable code after it.
If a
raise
orfailwith
is placed inside an async{} block without areturn
before it, then the F# compiler will demand that you return a proper value (in case function returnsAsync<'T>
where'T
is different thanunit
). Because of that, the developer might add by mistake code that is actually unreachable without her realizing it.