Repository navigation
Commit 40efbc1
Test the completion domain function reports when started elsewhere
A `function` reports the completion domains its type declares, whatever
environment it's connected in. When its implementation completes inline,
as `just` does, the operation actually completes wherever the caller
started it, so the reported domain can differ from the domain that
`just` itself would report in the same environment.
This diff adds a test that pins that behaviour:
* in an environment whose `get_domain` names a domain derived from
`default_domain`, `just` reports that domain while a `function`
wrapping `just` reports `default_domain`;
* forwarding `get_domain` through a declared query doesn't change the
reported domain;
* a `function` that forwards a domain derived from `default_domain` but
declares the default is still constructible, since the constraint
accepts the declared domain when it's the common domain of the
declared and actual ones, while an unrelated forwarded domain is
rejected; and
* declaring the forwarded domain in `attrs<...>` makes the `function`
report it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent cee246e commit 40efbc1
1 file changed
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1232 | 1289 | | |
1233 | 1290 | | |
1234 | 1291 | | |
| |||
0 commit comments