mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix a mismatch in the generated interface type and contextual type for the init(rawValue:) initializer; the former was lacking the '(rawValue:)' label and freaking out SILGen's abstraction lowering. When deriving the body of init(rawValue:), substitute the (interface) raw type into the initializer's context, so that we can successfully compare it to other contextualized types in the body's context. Fixes <rdar://problem/19986886>. Swift SVN r25775
12 lines
446 B
Swift
12 lines
446 B
Swift
// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
|
|
|
|
// CHECK-LABEL: sil hidden @_TFO22enum_generic_raw_value1ECU__fMGS0_Q__FT8rawValueSi_GSqGS0_Q___
|
|
enum E<T>: Int {
|
|
case A = 1
|
|
}
|
|
|
|
// CHECK-LABEL: sil hidden @_TFO22enum_generic_raw_value1FCUSs9EquatableSs25IntegerLiteralConvertible_USs33_BuiltinIntegerLiteralConvertible__fMGS0_Q__FT8rawValueQ__GSqGS0_Q___
|
|
enum F<T: IntegerLiteralConvertible where T: Equatable>: T {
|
|
case A = 1
|
|
}
|