2021-11-09 02:05:27 +03:00
|
|
|
# Namespace deletion regression test
|
|
|
|
|
|
|
|
See https://github.com/unisonweb/unison/issues/1552
|
|
|
|
|
2021-11-09 04:38:49 +03:00
|
|
|
If branch operations aren't performed in the correct order it's possible to end up with unexpected results.
|
|
|
|
|
|
|
|
Previously the following sequence delete the current namespace
|
|
|
|
unexpectedly 😬.
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 21:45:20 +03:00
|
|
|
scratch/main> alias.term ##Nat.+ Nat.+
|
2021-11-09 02:05:27 +03:00
|
|
|
|
|
|
|
Done.
|
|
|
|
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> ls Nat
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
1. + (##Nat -> ##Nat -> ##Nat)
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
scratch/main> move.namespace Nat Nat.operators
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
Done.
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
scratch/main> ls Nat
|
2021-11-22 18:38:01 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
1. operators/ (1 term)
|
2021-11-22 18:38:01 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
scratch/main> ls Nat.operators
|
2021-11-09 02:05:27 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
1. + (##Nat -> ##Nat -> ##Nat)
|
2024-06-12 01:22:09 +03:00
|
|
|
|
2024-06-26 21:45:20 +03:00
|
|
|
```
|