Internal compiler error when using soul::AudioSamples::Stereo inside a struct

example here (just added the Test-struct to the ringtone example): https://soul.dev/lab/?id=10118d0ca35e36f92b01333fab961a73

when trying to compile it i’m getting:

Compiler Error: : - Command failed: soul generate --wasm --output=temp/10118d0ca35e36f92b01333fab961a73-7b781a89-5de8-49f0-89f4-70a2b2812ff3/out.wasm --llvm-dir=/usr/local/bin/wasm/dist temp/10118d0ca35e36f92b01333fab961a73-7b781a89-5de8-49f0-89f4-70a2b2812ff3/ClassicRingtone.soulpatch error: Internal compiler error: ""s != nullptr" failed at cloneType:171"

is it not possible to use complex types inside structs?

I’ll take a look.

Yes, it’s possible to use structs within structs, we do it frequently. I’ll investigate what’s going on here.

It appears to be an issue with namespaces, where the struct member from a different namespace causes the compiler to have a flap and get itself confused. I think we changed things in that area recently to add Koenig Lookup, and i’m guessing it’s not working out.

Thanks for finding an edge case - they are often embarrassingly short like this one :slight_smile:

Actually, turned out to be a program cloning problem, which is now fixed. It’ll be resolved in the next release

1 Like

cool, thanks for the update! :slight_smile: