File tree Expand file tree Collapse file tree 5 files changed +165
-114
lines changed Expand file tree Collapse file tree 5 files changed +165
-114
lines changed Original file line number Diff line number Diff line change @@ -36,28 +36,3 @@ public func asyncOptional(i: Int64) async throws -> Int64? {
3636public func asyncThrows( ) async throws {
3737 throw MySwiftError . swiftError
3838}
39-
40- public func asyncRunningSum( ) async -> Int64 {
41- let totalSum = await withTaskGroup ( of: Int64 . self) { group in
42- // 1. Add child tasks to the group
43- for number in stride ( from: Int64 ( 1 ) , through: 100 , by: 1 ) {
44- group. addTask {
45- try ? await Task . sleep ( for: . milliseconds( number) )
46- return number
47- }
48- }
49-
50- var collectedSum : Int64 = 0
51-
52- // `for await ... in group` loops as each child task completes,
53- // (not necessarily in the order they were added).
54- for await number in group {
55- collectedSum += number
56- }
57-
58- return collectedSum
59- }
60-
61- // This is the value returned by the `withTaskGroup` closure.
62- return totalSum
63- }
Original file line number Diff line number Diff line change @@ -1096,10 +1096,6 @@ extension JNISwift2JavaGenerator {
10961096 case . replacingPlaceholder( let inner, let placeholder) :
10971097 return inner. render ( & printer, placeholder)
10981098
1099- case . return( let inner) :
1100- let inner = inner. render ( & printer, placeholder)
1101- return " return \( inner) ; "
1102-
11031099 case . lambda( let args, let body) :
11041100 var printer = CodePrinter ( )
11051101 printer. printBraceBlock ( " ( \( args. joined ( separator: " , " ) ) ) -> " ) { printer in
@@ -1112,9 +1108,6 @@ extension JNISwift2JavaGenerator {
11121108 }
11131109 return printer. finalize ( )
11141110
1115- case . null:
1116- return " null "
1117-
11181111 case . print( let inner) :
11191112 let inner = inner. render ( & printer, placeholder)
11201113 printer. print ( " \( inner) ; " )
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2025 Apple Inc. and the Swift.org project authors
6+ // Licensed under Apache License v2.0
7+ //
8+ // See LICENSE.txt for license information
9+ // See CONTRIBUTORS.txt for the list of Swift.org project authors
10+ //
11+ // SPDX-License-Identifier: Apache-2.0
12+ //
13+ //===----------------------------------------------------------------------===//
14+
115import SwiftJava
216
317extension _JNIMethodIDCache {
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2025 Apple Inc. and the Swift.org project authors
6+ // Licensed under Apache License v2.0
7+ //
8+ // See LICENSE.txt for license information
9+ // See CONTRIBUTORS.txt for the list of Swift.org project authors
10+ //
11+ // SPDX-License-Identifier: Apache-2.0
12+ //
13+ //===----------------------------------------------------------------------===//
14+
115import CSwiftJavaJNI
216import SwiftJava
317
You can’t perform that action at this time.
0 commit comments