First use of a generic method fixes its generic type #1628
Labels
bug
Something isn't working
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
P: critical
Should be looked at before anything else
Here, the first use of
fn write<T>(self, val: T, offset: u64)
with abool
sets itsT
tobool
and prevents it from being called with au64
(or something else) later.The
Buffer
in question:You can find the full code of
Buffer
(andstd::mem
) here: https://github.com/FuelLabs/sway/blob/522bf95b7f06e679161712ae4a0821c74f318a2c/sway-lib-std/src/mem.swThe text was updated successfully, but these errors were encountered: