You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-5112 Not correct function types in Swift4 (typeof)
Issue Description:
Swift should properly distinguish between single-tuple and multiple-argument function types.
But it isn't, as demonstrated below.
The following is the behavior of swift-DEVELOPMENT-SNAPSHOT-2017-06-05-a-osx (-swift-version 4):
// The second func results in error: "Invalid redeclaration of 'foo'"
func foo(_ fn: (Int, Int) -> ()) { print("I got a func of two ints!") }
func foo(_ fn: ((Int, Int)) -> ()) { print("I got a func of a tuple of two ints!") }
// I would expect this to compile since the args of the two
// foo functions are of different types.
In ValueDecl::getOverloadSignature, we’re canonicalizing the result of calling mapSignatureFunctionType. It also looks like within mapSignatureFunctionType we use getAs<TupleType> which will walk past the ParenType. If we then reform the type we end up dropping the ParenType:
if (anyChanged) {
argTy = TupleType::get(elements, ctx);
Sorry for the extra traffic, I just wanted to make sure all the various test cases that expose the same bug are at least linked in the bug tracker with proper links. Jens, if the devs sometimes forget to set the duplicate in the system and just comment about that, you can do it for them. Instead of `Close Issue`, use `Resolve Issue` first. From `Resolution` drop down select `Duplicate`, then from `Linked Issues` drop down select “duplicates” and fill the master bug in the `Issue` field. Now you can finally `Resolve`. After all this is done, `Close Issue`. I know proper process hygiene isn’t much fun in JIRA, but it helps to keep thing in order. This is Swift’s institutional memory.
When one of my issues has been marked "resolved" by the devs, after fixing the issue, am I correct in that I should "close" it after verifying that I can no longer reproduce it?
From memory... (Can't find other docs than this forum post) I think you should close it after you verify it solved the problem for you.
It's a bit unclear, but I think if you should wait for the fix to ship in a release version.
(Probably depends on the version you're reporting from...)
Additional Detail from JIRA
md5: 508c5675ce49fc41b6be9c9ff13af9e0
duplicates:
Issue Description:
Swift should properly distinguish between single-tuple and multiple-argument function types.
But it isn't, as demonstrated below.
The following is the behavior of swift-DEVELOPMENT-SNAPSHOT-2017-06-05-a-osx (-swift-version 4):
(Reported as requested by Mark Lacey here:
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170605/037013.html
)
The text was updated successfully, but these errors were encountered: