Thanks for sharing @grossvogel. This issue is un-killable ![]()
You’re not doing anything wrong. But unfortunately I fear we’re getting out of options here to deal with it in the language itself.
I managed to silence it using the following two workarounds:
def produce do
# option 1: un-inline the MapSet creation so it's not a literal anymore
list = [1, 2, 3])
MapSet.new(list)
end
or
# option 2: replace produce/0 by a module attr
@produce MapSet.new([1, 2, 3])
def driver, do: consume(@produce)
But honestly it might be better to just explicitly disable opaqueness checks when working with MapSet rather than jumping through hoops and try to trick dialyzer.






















