@@ -156,8 +156,8 @@ func propOfLValue(_ x: Error) -> String {
156
156
// HECK: [[LOAD:%.*]] = load [copy] %{{.*}} : $*T
157
157
// HECK: return [[LOAD]] : $T
158
158
// CHECK-LABEL: } // end sil function '$s20opaque_values_silgen7lastValyxxd_tlF'
159
- func lastVal< T> ( _ rest: T ... ) -> T {
160
- var minValue : T
159
+ func lastVal< T> ( _ initial : T , _ rest: T ... ) -> T {
160
+ var minValue = initial
161
161
for value in rest {
162
162
minValue = value
163
163
}
@@ -399,7 +399,7 @@ func testEmptyReturnClosure() {
399
399
// CHECK: bb1(%{{.*}} : @guaranteed $C):
400
400
// CHECK: bb2(%{{.*}} : @guaranteed $AnyObject):
401
401
// CHECK-LABEL: } // end sil function
402
- func testCastClassToAnyObject( _ c: C ) -> AnyObject {
402
+ func testCastClassToAnyObject( _ c: C ) {
403
403
switch ( c) {
404
404
case let x as AnyObject :
405
405
_ = x
@@ -412,7 +412,7 @@ func testCastClassToAnyObject(_ c: C) -> AnyObject {
412
412
// CHECK: [[CP:%.*]] = copy_value %0 : $AnyObject
413
413
// CHECK: checked_cast_br [[CP]] : $AnyObject to C, bb1, bb2
414
414
// CHECK-LABEL: } // end sil function '$s20opaque_values_silgen24testCastAnyObjectToClassyAA1CCyXlF'
415
- func testCastAnyObjectToClass( _ o: AnyObject ) -> C {
415
+ func testCastAnyObjectToClass( _ o: AnyObject ) {
416
416
switch ( o) {
417
417
case let x as C :
418
418
_ = x
@@ -427,7 +427,7 @@ func testCastAnyObjectToClass(_ o: AnyObject) -> C {
427
427
// CHECK: [[CP:%.*]] = copy_value %0 : $T
428
428
// CHECK: checked_cast_br [[CP]] : $T to C, bb1, bb2
429
429
// CHECK-LABEL: } // end sil function '$s20opaque_values_silgen024testCastClassArchetypeToF0yAA1CCxRlzClF'
430
- func testCastClassArchetypeToClass< T : AnyObject > ( _ o: T ) -> C {
430
+ func testCastClassArchetypeToClass< T : AnyObject > ( _ o: T ) {
431
431
switch ( o) {
432
432
case let x as C :
433
433
_ = x
@@ -438,7 +438,10 @@ func testCastClassArchetypeToClass<T : AnyObject>(_ o: T) -> C {
438
438
}
439
439
440
440
class TestGeneric < T> {
441
- init ( ) { }
441
+ init ( _ _generic: T , _ _borrowedGeneric: T ) {
442
+ generic = _generic
443
+ borrowedGeneric = _borrowedGeneric
444
+ }
442
445
443
446
var generic : T
444
447
@_borrowed
0 commit comments