Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Mar 9, 2020

…ve" generic parameters

Consider following example:

struct MyType<TyA, TyB> {
  var a : TyA, b : TyB
}

typealias B<T1> = MyType<T1, T1>

_ = B(a: "foo", b: 42)

Here T1 is equal to TyA and TyB so diagnostic about
conflicting arguments ('String' vs. 'Int') should only be
produced for "representative" T1.

…ve" generic parameters

Consider following example:

```swift
struct MyType<TyA, TyB> {
  var a : TyA, b : TyB
}

typealias B<T1> = MyType<T1, T1>

_ = B(a: "foo", b: 42)
```

Here `T1` is equal to `TyA` and `TyB` so diagnostic about
conflicting arguments ('String' vs. 'Int') should only be
produced for "representative" `T1`.
@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2020

This is a part of #30006 which is unrelated to underlying problem that got it reverted.

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2020

@swift-ci please smoke test

@xedin xedin merged commit 9ce4b60 into swiftlang:master Mar 9, 2020
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.

1 participant