File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ std::string toFullyQualifiedTypeNameString(const swift::Type &Type) {
71
71
Options.AlwaysDesugarArraySliceTypes = true ;
72
72
Options.AlwaysDesugarDictionaryTypes = true ;
73
73
Options.AlwaysDesugarOptionalTypes = true ;
74
+ Options.PrintTypeAliasUnderlyingType = true ;
74
75
Options.OpaqueReturnTypePrinting =
75
76
PrintOptions::OpaqueReturnTypePrintingMode::WithOpaqueKeyword;
76
77
Type.print (OutputStream, Options);
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ extension String: Foo {}
321
321
// CHECK-NEXT: },
322
322
// CHECK-NEXT: {
323
323
// CHECK-NEXT: "label": "tuple3",
324
- // CHECK-NEXT: "type": "Swift.Void ",
324
+ // CHECK-NEXT: "type": "() ",
325
325
// CHECK-NEXT: "mangledTypeName": "n/a - deprecated",
326
326
// CHECK-NEXT: "isStatic": "false",
327
327
// CHECK-NEXT: "isComputed": "false",
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: echo "[MyProto]" > %t/protocols.json
3
+
4
+ // RUN: %target-swift-frontend -typecheck -emit-const-values-path %t/ExtractTypeAliasUnderlyingType.swiftconstvalues -const-gather-protocols-file %t/protocols.json -primary-file %s
5
+ // RUN: cat %t/ExtractTypeAliasUnderlyingType.swiftconstvalues 2>&1 | %FileCheck %s
6
+
7
+ protocol MyProto { }
8
+
9
+ public struct SomeStruct {
10
+ typealias SomeTypeAlias = String
11
+ }
12
+
13
+ public struct Foo : MyProto {
14
+ var name : SomeStruct . SomeTypeAlias ?
15
+ }
16
+
17
+ // CHECK: "properties": [
18
+ // CHECK-NEXT: {
19
+ // CHECK-NEXT: "label": "name",
20
+ // CHECK-NEXT: "type": "Swift.Optional<Swift.String>",
You can’t perform that action at this time.
0 commit comments