I've finally found the time to work on this issue https://github.com/gleam-lang/gleam/issues/2243 and I think I might have fixed it! The problem is, I'm having a hard time figuring out where I should put the different tests.
For example I've added a test to compiler_core/src/type_/tests/assignments to check the variable assigned with the pattern is actually inferred to be a string. However, I would like to add more test cases with complex patterns inside the branches of a case to check that everything is working as expected. Where should I put such tests?