Avatar
Avatar
nanasi
@swift-5.6.3 @swift-main import Foundation @propertyWrapper struct Wrapper<Value> { var wrappedValue: Value var projectedValue: Self { get { self } set { self = newValue } } init(wrappedValue: Value) { self.wrappedValue = wrappedValue } init(projectedValue: Self) { self = projectedValue } } struct Foo { init(@Wrapper val: Int) {} } func call() { @Wrapper var val = 10 Foo($val: _val) } call() (edited)
exit status: 139 with stderr:<stdin>:24:5: warning: result of 'Foo' initializer is unused Foo($val: _val) ^ ~~~~~~~~~~~~ Stack dump: 0. Program arguments: /usr/bin/swift-frontend -frontend -interpret - -disable-objc-interop -new-driver-path /usr/bin/swift-driver -resource-dir /usr/lib/swift -module-name main 1. Swift version 5.6.2 (swift-5.6.2-RELEASE) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "<stdin>") 4. While evaluating request TypeCheckFunctionBodyRequest(main.(file).call()@<stdin>:22:6) 5. While computing captures for 'call()' (at <stdin>:22:1) Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): /usr/bin/swift-frontend[0x5187de3] /usr/bin/swift-frontend[0x5185b7e] /usr/bin/swift-frontend[0x5188176] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7fab3d796980] /usr/bin/swift-frontend[0x13188ba] /usr/bin/swift-frontend[0x13194dc] /usr/bin/swift-frontend[0x1541a35] /usr/bin/swift-frontend[0x15418ff] /usr/bin/swift-frontend[0x1541b3d] /usr/bin/swift-frontend[0x15434b2] /usr/bin/swift-frontend[0x1541224] /usr/bin/swift-frontend[0x13181eb] /usr/bin/swift-frontend[0x12498c8] /usr/bin/swift-frontend[0x1606f12] /usr/bin/swift-frontend[0x1606d9f] /usr/bin/swift-frontend[0x158e8de] /usr/bin/swift-frontend[0x158e8ba] /usr/bin/swift-frontend[0x12770d9] /usr/bin/swift-frontend[0x1278b21] /usr/bin/swift-frontend[0x12789bb] /usr/bin/swift-frontend[0x1276f6a] /usr/bin/swift-frontend[0x1276f44] /usr/bin/swift-frontend[0x649619] /usr/bin/swift-frontend[0x48df47] /usr/bin/swift-frontend[0x4463af] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fab3ba04c87] /usr/bin/swift-frontend[0x445dda] (edited)