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 {
151151 isGenericStub = false
152152
153153 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+ )
155159 }
156160
157161 default :
@@ -277,6 +281,7 @@ struct DistributedResolvableMacroDiagnostic: DiagnosticMessage {
277281 enum ID : String {
278282 case invalidApplication = " invalid type "
279283 case missingInitializer = " missing initializer "
284+ case invalidGenericArgument = " invalid generic argument "
280285 }
281286
282287 var message : String
Original file line number Diff line number Diff line change @@ -291,3 +291,12 @@ struct ValueStruct<let N: Int> {}
291291func genericTest1< T> ( _: T ) { }
292292func genericTest2< each T > ( _: repeat each T ) { }
293293func genericTest4< let T: Int > ( _: ValueStruct < T > ) { }
294+
295+ func concreteValueTest1( _: ValueStruct < 123 > ) { }
296+ func concreteValueTest2( _: ValueStruct < - 123 > ) { }
297+
298+ extension ValueStruct where N == 123 { }
299+ extension ValueStruct where 123 == N { }
300+ extension ValueStruct where N == - 123 { }
301+ extension ValueStruct where - 123 == N { }
302+
You can’t perform that action at this time.
0 commit comments