HaxeFoundation / HaxeFoundation/haxe
Add a way to skip a `@:from` cast for consideration by top down inference.
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
In tink_core there's a whole bunch of abstracts over functions returning promises such as [`Next`](https://github.com/haxetink/tink_core/blob/aea0dd2227d22156716c70561168765f6294de15/src/tink/core/Promise.hx#L307),[`Combiner`](https://github.com/haxetink/tink_core/blob/aea0dd2227d22156716c70561168765f6294de15/src/tink/core/Promise.hx#L338) and [`Recover`](https://github.com/haxetink/tink_core/blob/aea0dd2227d22156716c70561168765f6294de15/src/tink/core/Promise.hx#L332) where the `@:from` casts were never meant to be taken into account by top down inference, but rather the `from` (which happened to work with the somewhat borked behavior we had prior to 4.3). Now they're processed and this has some unintended side effects, ranging from additional allocations to compiler errors (although those are rare). So it'd be great if I could somehow have them skipped with some additional meta or whatever, really. Could also be `@:from(ignoredByInference)` or something of the sort.
Contributor guide
Assessment
This issue has not been assessed yet.