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

[Diagnostics] Improve contextual member unexpected arguments diagnostic #18167

Merged
merged 1 commit into from Jul 24, 2018

Conversation

Projects
None yet
2 participants
@mdiep
Copy link
Contributor

mdiep commented Jul 24, 2018

This improves the diagnostic reported in SR-4270.

With this code:

enum A { 
	case a
	static var b: A { return .a }
}
let _: A = .a()
let _: A = .b()

Before:

4270.swift:5:13: error: member 'a' is not a function
let _: A = .a()
            ^~~
             
4270.swift:6:13: error: member 'b' is not a function
let _: A = .b()
            ^~~

After:

4270.swift:5:13: error: enum case 'a' has no associated values
let _: A = .a()
            ^~~
             
4270.swift:6:13: error: static var 'b' is not a function
let _: A = .b()
            ^~~

@mdiep mdiep changed the title Improve contextual member unexpected arguments diagnostic [Diagnostics] Improve contextual member unexpected arguments diagnostic Jul 24, 2018

@xedin

This comment has been minimized.

Copy link
Member

xedin commented Jul 24, 2018

@swift-ci please smoke test

@xedin

xedin approved these changes Jul 24, 2018

Copy link
Member

xedin left a comment

LGTM, thank you!

@xedin xedin merged commit 2a0cbc9 into apple:master Jul 24, 2018

2 checks passed

Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform (smoke test)
Details

@mdiep mdiep deleted the mdiep:SR-4270 branch Jul 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment