You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -857,8 +872,7 @@ final class MacroSystemTests: XCTestCase {
857
872
var x: Int
858
873
""",
859
874
expandedSource:"""
860
-
var x: Int
861
-
{
875
+
var x: Int {
862
876
get {
863
877
_x.wrappedValue
864
878
}
@@ -958,8 +972,7 @@ final class MacroSystemTests: XCTestCase {
958
972
""",
959
973
expandedSource:"""
960
974
struct Foo {
961
-
subscript() -> Int
962
-
{
975
+
subscript() -> Int {
963
976
get {
964
977
return 1
965
978
}
@@ -1064,7 +1077,7 @@ final class MacroSystemTests: XCTestCase {
1064
1077
diagnostics:[
1065
1078
DiagnosticSpec(
1066
1079
message:
1067
-
"swift-syntax applies macros syntactically but there is no way to represent a variable declaration with multiple bindings that have accessors syntactically. While the compiler allows this expansion, swift-syntax cannot represent it and thus disallows it.",
1080
+
"swift-syntax applies macros syntactically and there is no way to represent a variable declaration with multiple bindings that have accessors syntactically. While the compiler allows this expansion, swift-syntax cannot represent it and thus disallows it.",
1068
1081
line:1,
1069
1082
column:1,
1070
1083
severity:.error
@@ -1083,8 +1096,7 @@ final class MacroSystemTests: XCTestCase {
1083
1096
var x: Int
1084
1097
""",
1085
1098
expandedSource:"""
1086
-
var x: Int
1087
-
{
1099
+
var x: Int {
1088
1100
get {
1089
1101
return 1
1090
1102
}
@@ -1249,17 +1261,15 @@ final class MacroSystemTests: XCTestCase {
1249
1261
expandedSource:"""
1250
1262
1251
1263
struct Point {
1252
-
var x: Int
1253
-
{
1264
+
var x: Int {
1254
1265
get {
1255
1266
_storage[wrappedKeyPath: \\.x]
1256
1267
}
1257
1268
set {
1258
1269
_storage[wrappedKeyPath: \\.x] = newValue
1259
1270
}
1260
1271
}
1261
-
var y: Int
1262
-
{
1272
+
var y: Int {
1263
1273
get {
1264
1274
_storage[wrappedKeyPath: \\.y]
1265
1275
}
@@ -1417,6 +1427,30 @@ final class MacroSystemTests: XCTestCase {
0 commit comments