Fixup resolution-failures.md

This commit is contained in:
Chris Penner 2024-07-02 09:46:40 -07:00
parent 498e898e0f
commit 9af023b8ba
2 changed files with 16 additions and 6 deletions

View File

@ -4,6 +4,10 @@ This transcript tests the errors printed to the user when a name cannot be resol
## Codebase Setup
```ucm
scratch/main> builtins.merge lib.builtins
```
First we define differing types with the same name in different namespaces:
```unison

View File

@ -4,6 +4,12 @@ This transcript tests the errors printed to the user when a name cannot be resol
## Codebase Setup
```ucm
scratch/main> builtins.merge lib.builtins
Done.
```
First we define differing types with the same name in different namespaces:
```unison
@ -26,8 +32,8 @@ two.ambiguousTerm = "term two"
type one.AmbiguousType
type two.AmbiguousType
one.ambiguousTerm : ##Text
two.ambiguousTerm : ##Text
one.ambiguousTerm : Text
two.ambiguousTerm : Text
```
```ucm
@ -37,8 +43,8 @@ scratch/main> add
type one.AmbiguousType
type two.AmbiguousType
one.ambiguousTerm : ##Text
two.ambiguousTerm : ##Text
one.ambiguousTerm : Text
two.ambiguousTerm : Text
```
## Tests
@ -114,7 +120,7 @@ useAmbiguousTerm = ambiguousTerm
I found some terms in scope that have matching names and
types. Maybe you meant one of these:
one.ambiguousTerm : ##Text
two.ambiguousTerm : ##Text
one.ambiguousTerm : Text
two.ambiguousTerm : Text
```