[SR-7297] Discarding a function from a discardableResult method causes a compiler error #49845
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
good first issue
Good for newcomers
type checker
Area → compiler: Semantic analysis
Environment
Swift version 4.2-dev (LLVM 95345677bd, Clang daefc772c1, Swift 76c264e)
Target: x86_64-apple-darwin17.4.0
Additional Detail from JIRA
md5: e13cd5b57c6ed6e6ebdcd72597f0a419
duplicates:
@discardableResult
not working for static function with function return typerelates to:
Issue Description:
This example doesn't compile:
But really it should. Interestingly enough it does compile if it's a top-level function:
The text was updated successfully, but these errors were encountered: