Skip to content

Commit cc9047d

Browse files
authored
Merge pull request #13122 from slavapestov/revert-an-assert-sigh
Revert "AST: UnboundGenericTypes are not legal SIL types"
2 parents 54f10c1 + b74d1b1 commit cc9047d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/AST/Type.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,6 @@ static bool isLegalSILType(CanType type) {
433433
// L-values and inouts are not legal.
434434
if (!type->isMaterializable()) return false;
435435

436-
// Unbound generic types are not legal.
437-
if (type->hasUnboundGenericType()) return false;
438-
439436
// Function types must be lowered.
440437
if (isa<AnyFunctionType>(type)) return false;
441438

test/IRGen/objc_generic_class_debug_info.swift renamed to test/DebugInfo/objc_generic_class_debug_info.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ import Swift
77
import Foundation
88
import objc_generics
99

10-
extension GenericClass {
10+
public extension GenericClass {
1111
func method() {}
1212
class func classMethod() {}
1313
}
14+
15+
public func takesFunction<T : AnyObject>(fn: @escaping (GenericClass<T>) -> ()) -> (GenericClass<T>) -> () {
16+
let copy = fn
17+
return copy
18+
}

0 commit comments

Comments
 (0)