Please see https://github.com/scala/scala3/issues/19924 Minimized repro here https://github.com/OlegYch/magnolia-test Pretty sure this should be fixed in scala itself, though.