Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions kmir/src/kmir/kdist/mir-semantics/kmir.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,10 @@ Therefore a heuristics is used here:
andBool isTypedValue(LOCALS[TUPLE])
andBool isTupleType(lookupTy(tyOfLocal({LOCALS[TUPLE]}:>TypedLocal)))
andBool isTypedLocal(LOCALS[CLOSURE])
andBool typeInfoVoidType ==K lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal))
// either the closure ref type is missing from type table
andBool (
typeInfoVoidType ==K lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal))
orBool isFunType(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))
)
[priority(40), preserves-definedness]

rule [setupCalleeClosure2]: <k> #setUpCalleeData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
┌─ 1 (root, init)
│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC
│ (740 steps)
│ (737 steps)
├─ 3 (terminal)
│ #EndProgram ~> .K
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fn apply<F: FnOnce(u8, u8) -> u8>(f: F, a: u8, b: u8) -> u8 {
f(a, b)
}

fn main() {
let result = apply(|x, y| x + y, 10, 32);
assert_eq!(result, 42);
}

This file was deleted.

1 change: 0 additions & 1 deletion kmir/src/tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
'test_offset_from-fail',
'ref-ptr-cast-elem-fail',
'ref-ptr-cast-elem-offset-fail',
'and_then_closure-fail',
]


Expand Down