Repository navigation
Should CustomType bounds be derivable from the type args? #1421
Closed
aborgna-q
started this conversation in
Specification
Replies: 1 comment
|
Nvm, this is already implemented for typedefs (it's just missing from the spec) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Some Custom types may be able to specify stricter bounds for some type instantiations.
For example, a
List[T]may beBound.Anyin general butBound.CopyableifT: Copyable.Note that that cannot be assumed in general. We could for example define a custom type resembling a tuple
(qubit, T), in which case the type would always beBound.Anyindependently ofT.Should we have some mechanism to compute the bounds given on instantiation?
All reactions