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) {
7171 Options.AlwaysDesugarArraySliceTypes = true ;
7272 Options.AlwaysDesugarDictionaryTypes = true ;
7373 Options.AlwaysDesugarOptionalTypes = true ;
74+ Options.PrintTypeAliasUnderlyingType = true ;
7475 Options.OpaqueReturnTypePrinting =
7576 PrintOptions::OpaqueReturnTypePrintingMode::WithOpaqueKeyword;
7677 Type.print (OutputStream, Options);
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ extension String: Foo {}
321321// CHECK-NEXT: },
322322// CHECK-NEXT: {
323323// CHECK-NEXT: "label": "tuple3",
324- // CHECK-NEXT: "type": "Swift.Void ",
324+ // CHECK-NEXT: "type": "() ",
325325// CHECK-NEXT: "mangledTypeName": "n/a - deprecated",
326326// CHECK-NEXT: "isStatic": "false",
327327// 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