Open ergl opened 6 years ago
Specifically, this seems to be related to array literal inference interacting with ByteSeqIter
.
@jemc do you have information you could put here that would allow this to be marked as ready for work?
It's not enough to mark it as ready for work, but I can provide some pointers:
The code for array literal inference is here: https://github.com/ponylang/ponyc/blob/3f5cf694ba10fba81df4999e167cad6274b990ee/src/libponyc/expr/array.c#L52-L355
The strategy for inference is to try to find a viable antecedent type (left hand side) and use it to infer the array literal on the right hand side.
It has separate inference strategies based on the antecedent type, tried in this order.
Array
apply
method that works like Array.apply
values
method that works like Array.values
For ByteSeqIter
, which is an interface with a values
method, it would be using the third strategy, for which the code is here: https://github.com/ponylang/ponyc/blob/3f5cf694ba10fba81df4999e167cad6274b990ee/src/libponyc/expr/array.c#L84-L119
See also #2790 for a bit more context & example code snippets.
Compiling this piece of code causes a compilation crash
Pony version: