Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Created Unassigned: Datatype constructor imported along multiple paths marked ambiguous [70]

$
0
0
Module M4 indirectly imports constructor D from M1 via both M2 and M3. Dafny complains that M4's reference to D is ambiguous, but it's really not.

```
module M1
{
datatype d = D()
}

module M2 { import opened M1 }
module M3 { import opened M1 }

module M4
{
import opened M2
import opened M3
method Main()
{
var x := D();
}
}
```

stdin.dfy(15,13): Error: the name 'D' denotes a datatype constructor, but does not do so uniquely; add an explicit qualification (for example, 'd.D')
1 resolution/type errors detected in stdin.dfy


Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>