Parametric interface does not compile and yields unrelated diagnostics when used by the client module

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

I’ve created a simple interface that uses a parametric type to constraint the conforming type to use itself as a parameter.
This interface seems to work in very strange ways (from the same file, or from a parent module, instead from a submodule).

Steps to Reproduce

Here’s the project structure:

root_module {
  submodule_1 {
    equatable.verse
  }
  manifest.verse # exposes submodule_1
  usage.verse # <-- when using `equatable` is will error out
}

Here’s the interface:

equatable<public>(self: type) := interface {
              # ^~~~~~~~~~~~~ Can't access a function from a preceding type.
  IsEqualTo<public>(Other: self)<transacts><decides>: void 
}

The conforming type:

test_type := class(equatable(test_type)) {
  IsEqualTo<override>(Other: test_type)<transacts><decides>: void = {}
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This function does not override a function but has an <override> attribute (3523)
}

Expected Result

It should compile just fine and be usable in the parent module from the submodule, not the other way around.

Observed Result

Emits unrelated diagnostics and prevents from being compiled.

Platform(s)

PC