Add "nested decl alias" precondition violation example

This commit is contained in:
Travis Staton 2024-03-19 11:25:05 -04:00
parent ad8b7b00b1
commit 06cc4e84e4
No known key found for this signature in database
GPG Key ID: 431DD911A00DAE49
2 changed files with 101 additions and 0 deletions

View File

@ -475,3 +475,35 @@ proj/main> merge2 /topic
```ucm:hide
.> project.delete proj
```
### Nested decl alias
```ucm:hide
.> project.create-empty proj
proj/main> builtins.mergeio
```
```unison
structural type Foo = FooCon
```
```ucm
proj/main> add
proj/main> branch topic
```
```unison
structural type Foo.Bar = BarCon
```
```ucm
proj/topic> add
```
```ucm:error
proj/main> merge2 /topic
```
```ucm:hide
.> project.delete proj
```

View File

@ -974,3 +974,72 @@ proj/main> merge2 /topic
Missing constructor name.
```
### Nested decl alias
```unison
structural type Foo = FooCon
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
structural type Foo
(also named builtin.Unit)
```
```ucm
proj/main> add
⍟ I've added these definitions:
structural type Foo
(also named builtin.Unit)
proj/main> branch topic
Done. I've created the topic branch based off of main.
Tip: Use `merge /topic /main` to merge your work back into the
main branch.
```
```unison
structural type Foo.Bar = BarCon
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
structural type Foo.Bar
(also named Foo and builtin.Unit)
```
```ucm
proj/topic> add
⍟ I've added these definitions:
structural type Foo.Bar
(also named Foo and builtin.Unit)
```
```ucm
proj/main> merge2 /topic
Nested decl alias.
```