Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The Python compiler emits reserved names for datatypes #4843

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

fabiomadge
Copy link
Collaborator

Fixes #4830

@@ -0,0 +1 @@
Python compiler emits reserved names for datatypes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Python compiler emits reserved names for datatypes
The Python compiler no longer emits reserved names for datatypes

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that it's a description of what needed fixing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay sure. It hasn't been our pattern, but since it ends up under a "Bug fixes" header in the release notes this style works too.

@@ -0,0 +1,3 @@
// RUN: %testDafnyForEachCompiler "%s"

datatype None = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How the heck did the standard libraries not trigger this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about the Dt name, not the constructor.

@fabiomadge fabiomadge changed the title fix: Python compiler emits reserved names for datatypes fix: The Python compiler emits reserved names for datatypes Dec 7, 2023
@robin-aws robin-aws enabled auto-merge (squash) December 8, 2023 23:51
@robin-aws robin-aws merged commit 5f30d1b into dafny-lang:master Dec 9, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python] Dafny can generate invalid class names for datatypes with reserved keywords
2 participants