Skip to content

Commit c4dbf91

Browse files
committed
AST Dumper: Don't canonicalize interface types
1 parent 9caaad4 commit c4dbf91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ namespace {
528528

529529
if (VD->hasInterfaceType()) {
530530
OS << " interface type='";
531-
VD->getInterfaceType()->getCanonicalType().print(OS);
531+
VD->getInterfaceType()->print(OS);
532532
OS << '\'';
533533
}
534534

test/expr/capture/generic_params.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
func doSomething<T>(_ t: T) {}
44

5-
// CHECK: func_decl "outerGeneric(t:x:)"<T> interface type='<τ_0_0> (t: τ_0_0, x: AnyObject) -> ()'
5+
// CHECK: func_decl "outerGeneric(t:x:)"<T> interface type='<T> (t: T, x: AnyObject) -> ()'
66

77
func outerGeneric<T>(t: T, x: AnyObject) {
88
// Simple case -- closure captures outer generic parameter
@@ -20,13 +20,13 @@ func outerGeneric<T>(t: T, x: AnyObject) {
2020

2121
// Nested generic functions always capture outer generic parameters, even if
2222
// they're not mentioned in the function body
23-
// CHECK: func_decl "innerGeneric(u:)"<U> interface type='<τ_0_0, τ_1_0> (u: τ_1_0) -> ()' {{.*}} captures=(<generic> )
23+
// CHECK: func_decl "innerGeneric(u:)"<U> interface type='<T, U> (u: U) -> ()' {{.*}} captures=(<generic> )
2424
func innerGeneric<U>(u: U) {}
2525

2626
// Make sure we look through typealiases
2727
typealias TT = (a: T, b: T)
2828

29-
// CHECK: func_decl "localFunction(tt:)" interface type='<τ_0_0> (tt: (a: τ_0_0, b: τ_0_0)) -> ()' {{.*}} captures=(<generic> )
29+
// CHECK: func_decl "localFunction(tt:)" interface type='<T> (tt: (a: T, b: T)) -> ()' {{.*}} captures=(<generic> )
3030
func localFunction(tt: TT) {}
3131

3232
// CHECK: closure_expr type='(TT) -> ()' {{.*}} captures=(<generic> )

0 commit comments

Comments
 (0)