File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
SourceryFramework/Sources/Parsing/SwiftSyntax/AST Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,14 @@ var dependencies: [Package.Dependency] = [
261
261
. package ( url: " https://github.com/swiftlang/swift-syntax.git " , from: " 600.0.0 " ) ,
262
262
. package ( url: " https://github.com/Quick/Quick.git " , from: " 3.0.0 " ) ,
263
263
. package ( url: " https://github.com/Quick/Nimble.git " , from: " 9.0.0 " ) ,
264
- . package ( url: " https://github.com/art-divin/swift-package-manager.git " , exact: " 1.0.8 " ) ,
265
264
]
266
265
266
+ #if compiler(>=6.2)
267
+ dependencies. append ( . package ( url: " https://github.com/swiftlang/swift-package-manager.git " , revision: " 5c57a39 " ) )
268
+ #else
269
+ dependencies. append ( . package ( url: " https://github.com/art-divin/swift-package-manager.git " , exact: " 1.0.8 " ) )
270
+ #endif
271
+
267
272
#if !canImport(ObjectiveC)
268
273
dependencies. append ( . package ( url: " https://github.com/apple/swift-crypto.git " , from: " 3.0.0 " ) )
269
274
#endif
Original file line number Diff line number Diff line change @@ -4,9 +4,15 @@ import SwiftSyntax
4
4
5
5
extension GenericType {
6
6
convenience init ( name: String , node: GenericArgumentClauseSyntax ) {
7
- let parameters = node. arguments. map { argument in
8
- GenericTypeParameter ( typeName: TypeName ( argument. argument) )
9
- }
7
+ // TODO: ExprSyntax may need to be handled
8
+ let parameters = node. arguments. map { argument -> GenericTypeParameter ? in
9
+ switch argument. argument {
10
+ case . type( let type) :
11
+ return GenericTypeParameter ( typeName: TypeName ( type) )
12
+ default : // case .expr
13
+ return nil
14
+ }
15
+ } . compactMap ( { $0 } )
10
16
11
17
self . init ( name: name, typeParameters: parameters)
12
18
}
You can’t perform that action at this time.
0 commit comments