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

[SR-3362] Defaulted parameter in operator function should be warned #45950

Open
rintaro mannequin opened this issue Dec 7, 2016 · 0 comments
Open

[SR-3362] Defaulted parameter in operator function should be warned #45950

rintaro mannequin opened this issue Dec 7, 2016 · 0 comments
Labels
compiler The Swift compiler in itself improvement parser Area → compiler: The legacy C++ parser

Comments

@rintaro
Copy link
Mannequin

rintaro mannequin commented Dec 7, 2016

Previous ID SR-3362
Radar None
Original Reporter @rintaro
Type Improvement
Environment

Apple Swift version 3.0.2 (swiftlang-800.0.61 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, Parser
Assignee None
Priority Medium

md5: 07f1f2345dd901d5e178c380ac1bf7f0

Issue Description:

This code compiles:

struct S {}
func +(lhs: S, rhs: Int = 42) {}
//                     ~~~~~

Since the default values in operator functions are unusable,
I think, it should be rejected warned.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement parser Area → compiler: The legacy C++ parser
Projects
None yet
Development

No branches or pull requests

0 participants