File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -621,7 +621,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
621
621
case DeclContextKind::MacroDecl:
622
622
return getOrCreateContext (DC->getParent ());
623
623
case DeclContextKind::GenericTypeDecl: {
624
+ // The generic signature of this nominal type has no relation to the current
625
+ // function's generic signature.
624
626
auto *NTD = cast<NominalTypeDecl>(DC);
627
+ GenericContextScope scope (IGM, NTD->getGenericSignature ().getCanonicalSignature ());
628
+
625
629
auto Ty = NTD->getDeclaredInterfaceType ();
626
630
// Create a Forward-declared type.
627
631
auto DbgTy = DebugTypeInfo::getForwardDecl (Ty);
@@ -673,9 +677,6 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
673
677
// The function return type is the first element in the list.
674
678
createParameterType (Parameters, getResultTypeForDebugInfo (IGM, FnTy));
675
679
676
- // Actually, the input type is either a single type or a tuple
677
- // type. We currently represent a function with one n-tuple argument
678
- // as an n-ary function.
679
680
for (auto Param : FnTy->getParameters ())
680
681
createParameterType (
681
682
Parameters, IGM.silConv .getSILType (
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-ir -g %s
2
+
3
+ public protocol P {
4
+ associatedtype Element
5
+ }
6
+
7
+ public struct G < T, U> {
8
+ public struct Nested { }
9
+
10
+ public init ( _: ( Nested ) -> ( ) ) { }
11
+ }
12
+
13
+ public extension P {
14
+ var values : G < Element , Int > {
15
+ G < Element , Int > { x in }
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments