# \[Pitch 2\] Light-weight same-type requirement syntax

**URL:** <https://forums.swift.org/t/pitch-2-light-weight-same-type-requirement-syntax/55081>\
**Category:** Pitches\
**Created:** [February 3, 2022, 5:20pm UTC](https://forums.swift.org/t/pitch-2-light-weight-same-type-requirement-syntax/55081 "2022-02-03T17:20:44Z")\
**Posts on this page:** 1\
**Showing post:** 224

<div class="post-metadata">

**Author:** ![stephencelis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/stephencelis/32/2675_2.png) [@stephencelis](https://forums.swift.org/u/stephencelis)\
**Post date:** [March 11, 2022, 4:11pm UTC](https://forums.swift.org/t/pitch-2-light-weight-same-type-requirement-syntax/55081/224 "2022-03-11T16:11:27Z")

</div>

Spent some time with a recent snapshot and was really pleased with the experience! Great work, everyone! 😄

One thing that came up was that composed protocols don't seem to be supported. _E.g._, should this work?

```swift
func f() -> some (A<Int> & B<Int>) { … }

```

This also made me wonder if "generic" type aliases should support primary associated types. _E.g._:

```swift
typealias C<T> = (A<T> & B<T>)

func f() -> some C<Int> { … }

```

If so (or not), it would definitely be nice for the pitch to address things.

_Edit:_ One other question is how does one document a primary associated type? `Sequence` can document `Element` as:

> A type representing the sequence's elements.

But if it were redefined as `Sequence<Element>`, where would this documentation go?

---

_[View the full topic](https://forums.swift.org/t/pitch-2-light-weight-same-type-requirement-syntax/55081)._
