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

Can't test module under linux that has main.swift in it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Package Manager
    • Labels:
      None

      Description

      If I have a directory that has a source file and a main.swift in it (e.g. Sources/Foo/main.swift and Sources/Foo/Foo.swift) I can't write run a test for Foo.swift. I get an error that looks like this:

      /code/.build/debug/Foo.build/main.swift.o: In function `main':
      /code/Sources/Foo/main.swift:(.text+0x0): multiple definition of `main'
      /tmp/LinuxMain-3d0090.o:/code/Tests/LinuxMain.swift:(.text+0x0): first defined here
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jaybuff Jay Buffington
              • Votes:
                6 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: