-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Handle flexible type protocols appropriately #3165
Copy link
Copy link
Closed
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyA-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Metadata
Metadata
Assignees
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyA-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Pipe protocols allow for some rather magical things regarding types. For example, consider this protocol:
Furthermore,
startcould 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: