File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1840,8 +1840,15 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
1840
1840
return getFunctionInterfaceTypeWithCaptures (funcTy, func);
1841
1841
}
1842
1842
1843
- case SILDeclRef::Kind::EnumElement:
1844
- return cast<AnyFunctionType>(vd->getInterfaceType ()->getCanonicalType ());
1843
+ case SILDeclRef::Kind::EnumElement: {
1844
+ auto funcTy = cast<AnyFunctionType>(
1845
+ vd->getInterfaceType ()->getCanonicalType ());
1846
+ auto sig = getEffectiveGenericSignature (vd->getDeclContext ());
1847
+ return CanAnyFunctionType::get (sig,
1848
+ funcTy->getParams (),
1849
+ funcTy.getResult (),
1850
+ funcTy->getExtInfo ());
1851
+ }
1845
1852
1846
1853
case SILDeclRef::Kind::Allocator: {
1847
1854
auto *cd = cast<ConstructorDecl>(vd);
Original file line number Diff line number Diff line change @@ -212,6 +212,15 @@ extension Array where Element == AnyObject {
212
212
// CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE12DerivedClassCfE : $@convention(method) (@guaranteed Array<AnyObject>.DerivedClass) -> ()
213
213
var e : Element ? = nil
214
214
}
215
+
216
+ enum NestedEnum {
217
+ case hay
218
+ case grain
219
+
220
+ func makeHay( ) -> NestedEnum {
221
+ return . hay
222
+ }
223
+ }
215
224
}
216
225
217
226
func referenceNestedTypes( ) {
You can’t perform that action at this time.
0 commit comments