func foo(bar: T) // GitHub will color `bar` properly if we swap the order of its two scopes
typealias Foo<T> = Bar<T, Int> // right-hand side are generic params, not variables; also comments should be allowed here
protocol P: class { } // support class-requirement
// allow protocols to use associated types in where clauses <https://github.com/apple/swift-evolution/blob/master/proposals/0142-associated-types-constraints.md>
protocol IntSequence : Sequence where Iterator.Element == Int { }
class C: A, B { } // make inheritance matching more intelligent so the comma isn't entity.other.inherited-class
// use $ instead of \n so the following are both matched properly
protocol A {
associatedtype Iterator : IteratorProtocol
associatedtype SubSequence : Sequence where SubSequence.Iterator.Element == Iterator.Element
}
These changes address the following cases: