tailor
tailor copied to clipboard
File parse failure when with @objc and function Name open
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
@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.