Skip to content
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

File parse failure when with @objc and function Name open #462

Open
jinnatan opened this issue Oct 18, 2016 · 1 comment
Open

File parse failure when with @objc and function Name open #462

jinnatan opened this issue Oct 18, 2016 · 1 comment
Assignees
Labels

Comments

@jinnatan
Copy link

Tailor Version: v0.11.1

Swift Version: 3.0

Platform (Mac/Linux/Windows/CI): Mac

Installation Method: Homebrew

Steps to Reproduce Issue

make a new file Test.swift:


import Foundation
@objc(Test)
public protocol Test {
    func open(params: NSDictionary, success:(AnyObject?)->Void, failure:(String?, String?, NSError?)->Void)
}

Result

Test.swift could not be parsed successfully, skipping...

Is strange that if i change the function name to something else, it can be parsed. But it should still be parsed with the function name open

Expected Behavior

Parses file

Actual Behavior

Fails to parse file

@adityatrivedi adityatrivedi self-assigned this Oct 18, 2016
@adityatrivedi
Copy link
Member

@jinnatan this seems to be an issue with using any keyword as a function identifier. According to the docs:

keywords are reserved and can’t be used as identifiers unless they’re escaped with backticks

I am unsure as to why the compiler is not throwing an error. We will investigate this further and push a fix in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants