Skip to content

Fix the TypeChecker's omitNeedlessWords to use interface types. #7193

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
Feb 2, 2017

Conversation

jrose-apple
Copy link
Contributor

...avoiding a crash when trying to detect near misses of protocol requirements. Unfortunately I can't come up with a test case for the VarDecl changes; everything I try seems to already work. But using interface types is more correct anyway.

SR-3812

...avoiding a crash when trying to detect near misses of protocol
requirements. Unfortunately I can't come up with a test case for the
VarDecl changes; everything I try seems to already work. But using
interface types is more correct anyway.

https://bugs.swift.org/browse/SR-3812
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor

Thanks. I have a fix for a similar problem in SILGen coming up. I started ripping out VarDecl::getType altogether, to avoid this type of breakage in the future.

@jrose-apple
Copy link
Contributor Author

@kubamracek, what's up with the TSan test failure?

@jrose-apple
Copy link
Contributor Author

/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/swift/test/Sanitizers/tsan.swift:30:11: error: expected string not found in input
// CHECK: ThreadSanitizer: data race
          ^
<stdin>:1:1: note: scanning from here
==================
^
<stdin>:2:10: note: possible intended match here
WARNING: ThreadSanitizer: thread leak (pid=12554)
         ^

https://ci.swift.org/job/swift-PR-osx-smoke-test/4805/

@kubamracek
Copy link
Contributor

Flaky test, I guess. By looking at test/Sanitizers/tsan.swift, I think we need to pthread_join the two threads, or the main thread can exit before one the new threads ever gets a chance to run. Which is what I guess happened here.

@kubamracek
Copy link
Contributor

I'll submit a PR to fix that.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

Would still like a quick glance from Doug, but going ahead based on Slava's review.

@jrose-apple jrose-apple merged commit 37774eb into swiftlang:master Feb 2, 2017
@jrose-apple jrose-apple deleted the omit-needless-types branch February 2, 2017 22:26
@DougGregor
Copy link
Member

LGTM, sorry for the delay

jrose-apple added a commit to jrose-apple/swift that referenced this pull request Feb 2, 2017
…tlang#7193)

...avoiding a crash when trying to detect near misses of protocol
requirements. Unfortunately I can't come up with a test case for the
VarDecl changes; everything I try seems to already work. But using
interface types is more correct anyway.

https://bugs.swift.org/browse/SR-3812
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants