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-8916] Misleading error message on member ref with explicit empty argument names #51422

Open
hamishknight opened this issue Oct 5, 2018 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis

Comments

@hamishknight
Copy link
Collaborator

Previous ID SR-8916
Radar None
Original Reporter @hamishknight
Type Bug
Environment

Apple Swift version 4.2-dev (LLVM aeaaca98ed, Clang 1ddef2249a, Swift 20bb815)
Target: x86_64-apple-darwin17.7.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, TypeChecker
Assignee None
Priority Medium

md5: ca3ac598a81990426ce458dc467da9a9

Issue Description:

The error message on the following is a bit misleading:

struct Foo {
  let bar: (String) -> Void = { _ in }
}

let foo = Foo()
foo.bar(_:)("") // error: Value of type 'Foo' has no member 'bar'

Foo does have a member bar, it's just that the user is incorrectly using syntax that is used to disambiguate functions rather than properties of function type.

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2018

cc @xedin, @rudkx

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants