Avatar
Avatar
Yuta Saito
@swift-5.7.3 @swift-5.6.3 @rethrows internal protocol _ErrorMechanism { associatedtype Output func get() throws -> Output } extension _ErrorMechanism { internal func _rethrowGet() rethrows -> Output { return try get() } } extension Result: _ErrorMechanism { } @rethrows protocol P { func foo() throws } struct S1: P { func foo() {} } struct E: Error {} func foo<T: P>(_: T.Type) rethrows { _ = try Result<Int, Error>.failure(E())._rethrowGet() } print("start program") foo(S1.self) print("end program") (edited)
swift57 BOT 8/5/2022 3:45 PM
exit status: 139 with stderr:Stack dump: 0. Program arguments: /usr/bin/swift-frontend -frontend -interpret - -disable-objc-interop -new-driver-path /usr/bin/swift-driver -empty-abi-descriptor -resource-dir /usr/lib/swift -module-name main 1. Swift version 5.7-dev (LLVM d5f117e38620783, Swift 260a80fcce5a2ab) 2. Compiling with the current language version 3. While running user code "<stdin>" (edited)