We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Swift version 5.1 (swiftlang-1100.0.266.1 clang-1100.0.32.1)
Xcode 11.0 beta 5 (11M382q)
md5: 2e2d01366b8623d39ed240c9b4a45bc9
Issue Description:
When the user declares a custom operator in the REPL, the operator is not defined in subsequent statements.
Steps to reproduce:
Open a terminal
Type in swift and press return to start the REPL
swift
Type in postfix operator % and press return to declare an operator
postfix operator %
Type in
postfix func %(value: Int) -> Int { value * 100 }
and press return to define an implementation for this newly defined operator.
Expected results:
This should work
Actual results:
The following compiler error occurs:
error: repl.swift:11:14: error: operator implementation without matching operator declaration postfix func %(value: Int) -> Int {
Notes:
Any prefix, infix or postfix operator that is manually defined, is affected by this issue.
This issue is also reproducible in Swift Playgrounds if the operator declaration is executed separately from the implementation or call.
The text was updated successfully, but these errors were encountered:
Hm, operators don't go through normal name lookup, so maybe they need special handling?
@swift-ci create
Sorry, something went wrong.
Unfortunately REPL is no longer supported by swift executable.
No branches or pull requests
Environment
Swift version 5.1 (swiftlang-1100.0.266.1 clang-1100.0.32.1)
Xcode 11.0 beta 5 (11M382q)
Additional Detail from JIRA
md5: 2e2d01366b8623d39ed240c9b4a45bc9
Issue Description:
When the user declares a custom operator in the REPL, the operator is not defined in subsequent statements.
Steps to reproduce:
Open a terminal
Type in
swift
and press return to start the REPLType in
postfix operator %
and press return to declare an operatorType in
and press return to define an implementation for this newly defined operator.
Expected results:
This should work
Actual results:
The following compiler error occurs:
Notes:
Any prefix, infix or postfix operator that is manually defined, is affected by this issue.
This issue is also reproducible in Swift Playgrounds if the operator declaration is executed separately from the implementation or call.
The text was updated successfully, but these errors were encountered: