Handle flexible type protocols appropriately #3165
Labels
A-concurrency
Area: Concurrency
A-syntaxext
Area: Syntax extensions
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Pipe protocols allow for some rather magical things regarding types. For example, consider this protocol:
Furthermore,
start
could be polymorphic itself and go to different instances ofwait_thing
.This is really flexible. Whether this flexibility is desirable is definitely a valid question.
If we decide we do want this flexibility, the protocol compiler needs to be sure to handle this correctly. I think compiling that protocol as an unbounded protocol would probably work fine, but the bounded version will probably fail in mysterious ways.
If we decide we don't want that flexible of polymorphic protocols, we should change the item macro syntax so we can do this instead:
The text was updated successfully, but these errors were encountered: