Type inference ignores generic arguments
chriseth opened this issue · 1 comments
chriseth commented
The following code errs with "Unable to derive concrete type for reference to generic symbol cols.f", even though they were explicitly set in the call:
mod cols {
enum Generic<T> {
A(T),
B,
}
let<T> f: -> Generic<T> = || {
Generic::B
};
}
machine Empty {
let x;
let fi: col = |i| match cols::f::<int>() {
cols::Generic::A(_) => 7,
cols::Generic::B => 9,
};
x = fi;
}
chriseth commented
The issue seems to be that the generic type args (the <int>
in cols::f::<int>()
) is not preserved when translating asm to pil, because the .pil
output from the asm file does not contain it.