Uploaded image for project: 'Swift'
  1. Swift
  2. SR-2028

"return" in func returning void should not have an argument

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Environment:

      Xcode 8.0 beta (8S128d), Swift 3

      Description

      func test()
      {
      	return   // Warning: Expression following 'return' is treated as an 
                          // argument of the 'return'
      		
      	print("foo")      // should not print, but it does
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            swifdy19%7 Peter Gasche
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated: