New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-6624] Incorrect error although build is successful in recent dev snapshots #49173
Comments
@benlangmuir, sounds like Live Issues aren't equipped to deal with a main.swift file in a multi-file project? |
Tried with dev snapshot 2012-12-17 and the issue remains. |
@swift-ci create |
Seems to have been fixed in Xcode 9.3 beta 2? |
But it's back in Xcode 9.3 beta 3 (and, in my current case right now, dev snapshot 2018-02-21, but I haven't tested other snapshots). |
Issue remains in dev snapshot 2018-02-25 (with Xcode 9.3 beta 3). |
Perhaps this bug should be filed as a radar instead? |
This is sourcekitd. I can reproduce in the 2017-12-12 snapshot but not the 12-11 one. The only change to sourcekitd in that timeframe was https://github.com/apple/swift/pull/13268 . It's easy to reproduce from the command-line:
|
Environment
Xcode 9.2 using toolchain dev snapshot 2017-12-12 or later
Additional Detail from JIRA
md5: e24d6c1d190b78a80ee9afc0c88e22fa
Issue Description:
Steps to reproduce:
Make sure you are using Xcode 9.2 and toolchain dev snapshot 2017-12-12 or later.
Start a new Command Line App project.
Being in the main.swift file, press Build, note that it builds as expected.
Add another swift file to the project (eg Other.swift), content doesn't matter.
Go back into main.swift and Build again, note that it builds successfully BUT the IDE will show an "Expressions are not allowed at the top level"-error on the line with print("Hello, world!"). And the error message will not go away if you clean etc.
Note that if you go into the Other.swift file and Build, you'll not see any error.
The issue will go away if I select an earlier toolchain I have (2017-12-09), and it comes back again if I reselect 2017-12-12.
The text was updated successfully, but these errors were encountered: