Skip to content

Commit

Permalink
[test] Add another test case for redundant requirement
Browse files Browse the repository at this point in the history
Co-Authored-By: theblixguy <suyashsrijan@outlook.com>
  • Loading branch information
harlanhaskins and theblixguy committed Nov 15, 2018
1 parent 81f797d commit 3faf202
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/decl/ext/protocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ protocol AnotherFooProtocol {}
protocol BazProtocol {}
extension AnotherFooProtocol where Self: BazProtocol, Self: AnotherFooProtocol {} // expected-warning {{requirement of 'Self' to 'AnotherFooProtocol' is redundant in an extension of 'AnotherFooProtocol'}}

protocol A {
associatedtype V
}

extension A where V: A {} // ok, does not warn because V is not Self

// ----------------------------------------------------------------------------
// Protocol extensions with additional requirements
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit 3faf202

Please sign in to comment.