blob: a0472dafb33a52210049d3bf9526ce024334841f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Optional types in type parameters
=================================
The easiest solution is probably to just require either:
1) both the parameter declaration and the usage to be optional, or
2) none of them to be optional.
For example:
type List<ref T> = ...
type Slot<ref? T> = ...
func f(ref List<ref Thing> l)
func g(ref Slot<ref? Thing> s)
How about merging with word-sized or smaller types?
- Merging should ONLY be allowed for non-optional types
|