You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codegen: a function returning Option[Unit] fails — return type mismatch at call site (struct{i32,i32} vs struct{i32}) #1218
Actual.
```
error: return type mismatch at call site actual=struct{i32,i32} expected=struct{i32} fn=main
error: code generation failed
```
Expected. prints `some`. The callee's declared return layout drops the zero-sized payload (`struct{i32}`) while the call site keeps a slot for it (`struct{i32,i32}`): two derivations of one type's layout.
Loud, not a miscompile. Found while testing `?` over Unit payloads (`Result[Unit, E]?` crashed the compiler in LLVM; fixed separately). `Result[Unit, E]` as a return type works.
Workaround used. None; the `?` test covers `Result[Unit, E]` only and should gain `Option[Unit]` when this is fixed.
Activity
zlib corpus gains minizip's reader; six defects it exposed (a `?` com…