Commit Graph

5 Commits

Author SHA1 Message Date
Jordan Rose
859b31f9c6 [AST] Fix printing of *un*constrained generic extensions
We were redundantly printing constraints that were implied by the base
type (the type being extended). Rather than special-casing constraints
on a protocol's 'Self' type, omit any requirements that are already
satisfied by the extended type instead.

https://bugs.swift.org/browse/SR-7413
2018-08-17 19:26:47 -07:00
Jordan Rose
fa8ac95fd0 Don't print 'convenience' on protocol extension initializers (#18777)
We model them that way in the compiler, but that's not part of the
user-level language.

rdar://problem/32067077
2018-08-17 19:25:40 -07:00
Xi Ge
9f39c8494d [SourceKitd] Avoid printing parent type directly on extended type. rdar:37965902 (#14892)
When printing parent type directly, we may print generic arguments and sugared
dictionary type.
2018-03-01 09:19:44 -08:00
Xi Ge
3ad7df273f [SourceKit] DocSupport: constraint extensions provide default implementation too. rdar://25692947 (#8398) 2017-03-28 15:55:39 -07:00
Xi Ge
6e3698f7e8 SourceKit: for DocSupport, report default implementations of inherited protocols in sub-protocol's extensions. rdar://25692947 (#8394)
For instance:

protocol P1 { 
  func foo() 
}
protocol P2 : P1 { 
  func bar() 
}
extension P2 { 
  func foo() {} 
}

We report the foo() in P2's extension as the default implementation of foo() declared in P1.
2017-03-28 12:10:29 -07:00