advanced features / phantom types

✓ 129 passing ○ 8 planned

Lessons

1 ✓ Passing
006 cleanup consumed by disposal
2 ✓ Passing
007 use after disposal
3 ✓ Passing
008 obligation escapes via interface
4 ✓ Passing
009 universal wildcard metatype
5 ✓ Passing
010 module wildcard metatype
6 ✓ Passing
011 auto discharge multiple
7 ✓ Passing
012 auto discharge explicit with multiple
8 ✓ Passing
013 auto discharge explicit ok
9 ✓ Passing
014 scope for loop inner
10 ✓ Passing
015 scope for loop outer
11 ✓ Passing
016 scope nested
12 ○ Planned
017 scope label loop — Auto-dispose for obligations in @loop branches not implemented
13 ✓ Passing
018 auto discharge escaped obligation
14 ✓ Passing
019 auto discharge branch constructor
15 ○ Planned
020 auto discharge void event — TODO: Auto-dispose doesn't trigger before void event invocations
16 ✓ Passing
021 auto discharge multiple resources
17 ✓ Passing
022 if manual both branches
18 ✓ Passing
023 if auto both branches
19 ✓ Passing
024 if hybrid manual auto
20 ✓ Passing
025 auto discharge disabled
21 ✓ Passing
026 auto discharge warn
22 ✓ Passing
027 db transaction pattern
23 ✓ Passing
028 ambiguous without default
24 ✓ Passing
029 module qualified phantom states
25 ✓ Passing
030 taps with auto discharge
26 ✓ Passing
031 tap binding substitution
27 ✓ Passing
032 nested for scopes
28 ✓ Passing
033 phantom state mismatch
29 ✓ Passing
034 unknown phantom module
30 ✓ Passing
035 autodischarge prefers void
31 ✓ Passing
036 autodischarge no void candidate
32 ✓ Passing
037 default discharge must be void
33 ✓ Passing
038 cleanup obligation satisfied
34 ○ Planned
039 transition metatype — Feature: Transition metatype requires taps.eventToString and taps.branchToString which don't exist yet
35 ✓ Passing
040 undisposed nested obligation
36 ✓ Passing
041 auto discharge single
37 ✓ Passing
042 metatype binding scope
38 ✓ Passing
043 auto discharge none
39 ✓ Passing
044 for manual done ok
40 ✓ Passing
045 for manual each error
41 ✓ Passing
046 for auto done ok
42 ✓ Passing
047 nested if in for
43 ✓ Passing
048 nested for in if
44 ✓ Passing
049 default discharge annotation
45 ✓ Passing
050 union accepts either state
46 ✓ Passing
051 union with consume marker
47 ✓ Passing
052 escape field name mismatch
48 ✓ Passing
053 for loop obligation escape
49 ✓ Passing
054 optional branch obligation
50 ○ Planned
055 auto discharge cascade — Cascading auto-discharge: discharge creates new obligations that also need discharging
51 ✓ Passing
056 union per member consume marker
52 ✓ Passing
057 auto discharge emission parity
53 ✓ Passing
058 reject issue on input
54 ✓ Passing
059 reject consume on output
55 ✓ Passing
060 reject state mismatch on input
56 ✓ Passing
061 inline obligation cascade
57 ✓ Passing
062 reject identity struct mismatch
58 ✓ Passing
063 phantom state on primitive
59 ✓ Passing
064 reject phantom primitive mismatch
60 ✓ Passing
065 phantom compound unit
61 ✓ Passing
066 phantom literal suffix callsite
62 ✓ Passing
067 reject bare literal at phantom param
63 ✓ Passing
068 phantom obligation on primitive string
64 ✓ Passing
069 reject undischarged string obligation
65 ✓ Passing
070 auto discharge strict convention
66 ✓ Passing
071 aspire chain autodischarge
67 ✓ Passing
073 label fold borrow outer own
68 ✓ Passing
074 obligation carried through back edge
69 ✓ Passing
075 back edge drops obligation
70 ✓ Passing
076 obligation seed via consuming param
71 ✓ Passing
077 reject carry consume in for
72 ○ Planned
078 reject dropped carried obligation — OWED hole: a label-fold that drops a carried <!owned> on one arm is refused — today it compiles and prints.
73 ✓ Passing
079 reject double consume carried
74 ✓ Passing
080 reject consume outside obligation in loop
75 ✓ Passing
081 container move i64 in loop
76 ✓ Passing
082 element obligation move in for
77 ✓ Passing
083 element obligation move through loop
78 ✓ Passing
084 nested loop carries outer obligation
79 ✓ Passing
085 obligation held across back edge
80 ✓ Passing
086 inline nested fold outer obligation
81 ✓ Passing
087 cross module qualified state unifies
82 ✓ Passing
088 reject bare state outside declaring module
83 ✓ Passing
089 taint tracking capability
84 ✓ Passing
090 auto discharge dotted disposer
85 ✓ Passing
091 auto discharge disable leaks through borrow
86 ✓ Passing
092 phantom direct return rechain drops obligation
87 ✓ Passing
093 flat phantom bind chain
88 ✓ Passing
094 bare return discard auto discharges
89 ✓ Passing
095 flow head obligation no continuation
90 ✓ Passing
096 obligation in record field
91 ✓ Passing
097 midchain unbound obligation leak
92 ✓ Passing
098 obligation record field under for each
93 ✓ Passing
099 obligation record field leak under subflow
94 ✓ Passing
100 obligation record field explicit discharge misdiagnosed under subflow
95 ✓ Passing
101 field narrowing discharge all
96 ✓ Passing
102 field narrowing drop remainder
97 ✓ Passing
103 partial destructure omits obligation
98 ✓ Passing
104 field narrowing three fields
99 ✓ Passing
105 narrowing keeps plain field
100 ✓ Passing
106 discharge out of order
101 ✓ Passing
107 destructure all then discharge
102 ✓ Passing
108 destructure may drop plain field
103 ✓ Passing
109 double discharge field
104 ✓ Passing
110 reject issue obligation in input
105 ✓ Passing
111 reject consume obligation in output
106 ✓ Passing
112 reject redundant phantom qualification
107 ✓ Passing
113 named capture obligation undischarged
108 ✓ Passing
114 produce obligation lost to continuation
109 ✓ Passing
115 branch payload obligation survives continuation
110 ✓ Passing
116 field narrowing mid chain
111 ✓ Passing
117 aliased obligation fields are proc business
112 ✓ Passing
118 conserving tor is not a disposal candidate
113 ✓ Passing
119 autodischarge use is invisible to koru100
114 ✓ Passing
120 unbound bare return obligation auto discharges
115 ✓ Passing
121 head label bind discharges through label
116 ✓ Passing
122 head label bind obligation undischarged
117 ○ Planned
123 midchain unbound still walls under disable — OWED hole: `--auto-discharge=disable` still refuses a terminal unbound obligation — today it compiles clean.
118 ✓ Passing
124 union discharger named in diagnostic
119 ✓ Passing
125 transferred obligation dropped in body
120 ✓ Passing
126 borrow return disposer auto discharges
121 ✓ Passing
127 arm owns obligation leak
122 ✓ Passing
128 label jump names arm and source binding
123 ✓ Passing
129 scope discharge names the arm
124 ✓ Passing
130 polarity diagnostic names the tor decl
125 ✓ Passing
131 scope exit ambiguity names the arm
126 ✓ Passing
132 default discharge annotation names the tor decl
127 ○ Planned
133 partial reissue keeps converting arm — OWED: a tor that re-issues on one arm and converts on another stays a disposal candidate.
128 ✓ Passing
multiple cleanup paths
129 ✓ Passing
multiple resources cleanup
130 ✓ Passing
multiple resources partial cleanup
131 ✓ Passing
state variable wildcard
132 ✓ Passing
state variable constrained accepts
133 ✓ Passing
state variable constraint violation
134 ✓ Passing
state variable chaining
135 ○ Planned
phantom state mismatch — Feature: Phantom state mismatch detection
136 ✓ Passing
phantom state valid
137 ✓ Passing
multiple errors