Open
Description
Describe the bug
With cppfront from git ecd3726 and g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0:
pred: (x: int) -> int = x < 20;
main: () =
{
p2 := :(x) -> _ = x < 20;
b := 5 is (p2); // true
std::cout << b << "\n";
b = 5 is (pred); // false
std::cout << b << "\n";
}
I expected both is
expressions to produce true
, but the second one is false
.
A secondary problem is that rewriting pred
to be a template fails to compile:
pred: (x) -> _ = x < 20;
lessthan.cpp2:48:17: error: no matching function for call to ‘is(int, <unresolved overloaded function type>)’
... snip candidates ...