Skip to content

[5.3][Diagnostics] Tailored diagnostics for missing member failure when in… #31386

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

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

LucianoPAlmeida
Copy link
Contributor

@LucianoPAlmeida LucianoPAlmeida commented Apr 28, 2020

… literal collection context

cc @xedin

Resolves SR-12672.
Resolves: rdar://problem/62383753

@xedin
Copy link
Contributor

xedin commented Apr 28, 2020

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Apr 28, 2020

@LucianoPAlmeida There is no need for dyn_cast on the anchor, it's still just an Expr *.

@LucianoPAlmeida
Copy link
Contributor Author

@LucianoPAlmeida There is no need for dyn_cast on the anchor, it's still just an Expr *.

Ah, I adjust real quick :) I wasn't sure so I looked at other references in the file the ones I've seen were like this

@LucianoPAlmeida
Copy link
Contributor Author

The Windows build failed with no identified reason ... should we kick it again?

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

Let's get that get<> removed and I'm going to kick it again.

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@swift-ci please smoke test

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e2025fdf9e67c6421ec97cf554eb8ba281bcd13c

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@swift-ci please smoke test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e2025fdf9e67c6421ec97cf554eb8ba281bcd13c

@LucianoPAlmeida
Copy link
Contributor Author

The error on Windows CSDiagnostics.cpp(3432): error C3535: cannot deduce type for 'auto *' from 'swift::constraints::TypedNode' ... so I think we should put the get<> back?

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

Hm, let me check what is going on here...

@LucianoPAlmeida
Copy link
Contributor Author

On linux CSDiagnostics.cpp:3432:9: error: variable 'expr' with type 'auto *' has incompatible initializer of type 'TypedNode' (aka 'PointerUnion<const swift::Expr *, const swift::TypeLoc *, const swift::VarDecl *, const swift::Pattern *>

So, I just put the get<>back and replace the cs.getParentExpr with findParentExpr from FailureDiagnostics

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

Sorry, it's my bad - use castToExpr, looks like only diagnostic refactoring got into 5.3 branch :)

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

Ok, let's do this!

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1a3cadb6ffec877daf94837e3aef9b15166ac5cd

@LucianoPAlmeida
Copy link
Contributor Author

Any reason for macos and windows not started?

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

Most likely they are in the queue, let’s give them some time :)

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 1a3cadb6ffec877daf94837e3aef9b15166ac5cd

@LucianoPAlmeida
Copy link
Contributor Author

Ok I just made sure it builds locally! So I think is fine now :)
@xedin mind kick the tests again?

@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 906fc40321001a1ca003769910017d6678c77f0a

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 906fc40321001a1ca003769910017d6678c77f0a

@xedin xedin merged commit 55f8a20 into swiftlang:release/5.3 Apr 29, 2020
@xedin
Copy link
Contributor

xedin commented Apr 29, 2020

@LucianoPAlmeida Thank you for fixing this!

@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants