File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/Macros/Sources/SwiftMacros Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,11 @@ extension DistributedResolvableMacro {
151
151
isGenericStub = false
152
152
153
153
case . expr:
154
- fatalError ( " Expression type not supported for distributed actor " )
154
+ throw DiagnosticsError (
155
+ syntax: sameTypeReq. rightType,
156
+ message: " Expression type not supported for distributed actor " ,
157
+ id: . invalidGenericArgument
158
+ )
155
159
}
156
160
157
161
default :
@@ -277,6 +281,7 @@ struct DistributedResolvableMacroDiagnostic: DiagnosticMessage {
277
281
enum ID : String {
278
282
case invalidApplication = " invalid type "
279
283
case missingInitializer = " missing initializer "
284
+ case invalidGenericArgument = " invalid generic argument "
280
285
}
281
286
282
287
var message : String
Original file line number Diff line number Diff line change @@ -290,3 +290,12 @@ struct ValueStruct<let N: Int> {}
290
290
func genericTest1< T> ( _: T ) { }
291
291
func genericTest2< each T > ( _: repeat each T ) { }
292
292
func genericTest4< let T: Int > ( _: ValueStruct < T > ) { }
293
+
294
+ func concreteValueTest1( _: ValueStruct < 123 > ) { }
295
+ func concreteValueTest2( _: ValueStruct < - 123 > ) { }
296
+
297
+ extension ValueStruct where N == 123 { }
298
+ extension ValueStruct where 123 == N { }
299
+ extension ValueStruct where N == - 123 { }
300
+ extension ValueStruct where - 123 == N { }
301
+
You can’t perform that action at this time.
0 commit comments