Files
swift-mirror/test/SILOptimizer/specialization_and_resilience.swift
Erik Eckstein 4017570de7 Generic Specializer: Use getResilienceExpansion() throughout ReabstractionInfo
It must be consistent, otherwise the specialized function types may not match for calls in functions with different resilience expansions.

Fixes an assertion crash in the generic specializer.

rdar://problem/57844964
2019-12-13 11:15:38 +01:00

20 lines
515 B
Swift

// RUN: %target-swift-frontend -parse-as-library -O -module-name=test %s -enable-library-evolution -emit-sil | %FileCheck %s
public enum En {
case A
case B
}
@inlinable
@inline(never)
func genfunc<T>(_ t: T) -> T {
return t
}
// CHECK-LABEL: sil @$s4test11callGenFuncyyF : $@convention(thin) () -> () {
// CHECK: = function_ref @$s4test7genfuncyxxlFAA2EnO_Tg5 : $@convention(thin) (En) -> @out En
// CHECK: } // end sil function '$s4test11callGenFuncyyF'
public func callGenFunc() {
_ = genfunc(En.A)
}