$ g++ examples/binary_tree.c -I. -Iexamples/build/_deps/metalang99-src/include -ftrack-macro-expansion=0
examples/binary_tree.c: In function ‘int sum(const BinaryTree*)’:
examples/binary_tree.c:17:9: error: invalid conversion from ‘void*’ to ‘Leaf_0*’ {aka ‘int*’} [-fpermissive]
17 | of(Leaf, x) return *x;
| ^~
| |
| void*
examples/binary_tree.c:17:9: error: invalid conversion from ‘void*’ to ‘Leaf_0*’ {aka ‘int*’} [-fpermissive]
17 | of(Leaf, x) return *x;
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘BinaryTree**’ [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘BinaryTree**’ [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘Node_1*’ {aka ‘int*’} [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘Node_1*’ {aka ‘int*’} [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘BinaryTree**’ [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*
examples/binary_tree.c:18:9: error: invalid conversion from ‘void*’ to ‘BinaryTree**’ [-fpermissive]
18 | of(Node, lhs, x, rhs) return sum(*lhs) + *x + sum(*rhs);
| ^~
| |
| void*