Skip to content

[ast-printer] Don't emit 'infix' attribute for decls #7328

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

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

swiftix
Copy link
Contributor

@swiftix swiftix commented Feb 8, 2017

Textual SIL containing something like: infix static func ==(a: T, b: T) -> Bool cannot be parsed and results in an error like:

error: 'infix' modifier is not required or allowed on func declarations

Interestingly enough, prefix and postfix attributes do not result in the same kind of errors.

Textual SIL containing something like: `infix static func ==(a: T, b: T) -> Bool` cannot be parsed and results in an error like:
```
error: 'infix' modifier is not required or allowed on func declarations
```

Interestingly enough, `prefix` and `postfix` attributes do not result in the same kind of errors.
@swiftix
Copy link
Contributor Author

swiftix commented Feb 8, 2017

@swift-ci please test

@swiftix
Copy link
Contributor Author

swiftix commented Feb 8, 2017

@jrose-apple @DougGregor Please have a look at the fix. It is trivial.

But I wonder if it is intended that only infix cannot be parsed, but prefix and postfix are OK?

@DougGregor
Copy link
Member

LGTM. prefix and postfix are needed because both are unary, so you need to distinguish between them.

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2017

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 9a7d28a
Test requested by - @swiftix

@swiftix
Copy link
Contributor Author

swiftix commented Feb 8, 2017

@swift-ci please smoke test Linux

@swiftix
Copy link
Contributor Author

swiftix commented Feb 8, 2017

please test linux failure seems to be totally unrelated.

@swiftix swiftix merged commit f7253bf into swiftlang:master Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants