File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 98e9f1b5efa9336b6eb1e7ddb5e5764033a058c9
2
+ refs/heads/master: 740e327cfe2d94ecf00c9da066421e1d9318e38d
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -401,3 +401,20 @@ func rdar_50099849() {
401
401
let _ = C < A , B > ( ) // expected-error {{generic parameter 'C' could not be inferred}}
402
402
// expected-note@-1 {{explicitly specify the generic arguments to fix this issue}} {{17-17=<<#C: Trivial#>>}}
403
403
}
404
+
405
+ // rdar://problem/50512161 - improve diagnostic when generic parameter cannot be deduced
406
+ func rdar_50512161( ) {
407
+ struct Item { }
408
+
409
+ struct TrivialItem : Trivial {
410
+ typealias T = Item ?
411
+ }
412
+
413
+ func foo< I> ( _: I . Type = I . self, item: I . T ) where I : Trivial { // expected-note {{in call to function 'foo(_:item:)'}}
414
+ fatalError ( )
415
+ }
416
+
417
+ func bar( _ item: Item ) {
418
+ foo ( item: item) // expected-error {{generic parameter 'I' could not be inferred}}
419
+ }
420
+ }
You can’t perform that action at this time.
0 commit comments