You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./SomeDependencyModule.dfy:
module SomeDependencyModule {
datatype None = | None (
)
const test :=None()
}
---
./SomeModule.dfy:
include "SomeDependencyModule.dfy"
module SomeModule {
import SomeDependencyModule
const test := SomeDependencyModule.None()
}
Command to run and resulting output
Compile:
dafny translate py SomeDependencyModule.dfy
dafny translate py SomeModule.dfy
Run:
lucmcdon@80a997335f93 none % cd SomeModule-py
lucmcdon@80a997335f93 SomeModule-py % python3
Python 3.12.3 (main, May 9 2024, 13:24:59) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import SomeModule
>>> SomeModule.default__.test
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/lucmcdon/.pyenv/versions/3.12.3/lib/python3.12/site-packages/_dafny/__init__.py", line 15, in __get__
return classmethod(self.fget).__get__(None, owner)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lucmcdon/workplace/dafny_test/none/SomeModule-py/SomeModule.py", line 19, in test
return SomeDependencyModule.None__None()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'SomeDependencyModule' has no attribute 'None__None'. Did you mean: 'None_None'?
What happened?
SomeDependencyModule.py correctly references the generated None_None type. SomeModule.py incorrectly references the generated None_None type by referring to it as None__None.
I expected SomeModule to reference it as None_None.
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered:
Dafny version
4.6.0
Code to produce this issue
Command to run and resulting output
What happened?
SomeDependencyModule.py
correctly references the generatedNone_None
type.SomeModule.py
incorrectly references the generatedNone_None
type by referring to it asNone__None
.I expected SomeModule to reference it as
None_None
.What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: