Skip to content

Commit

Permalink
Reverted internal prefix for every backend except Dafny (#5538)
Browse files Browse the repository at this point in the history
### Description
Some clients using Smithy-Dafny were stuck because we changed the
internal field prefix. We revert it in this PR by convenience for them
as we don't have an immediate need for this enhanced prefix.

### How has this been tested?
All tests should pass.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>

Co-authored-by: Robin Salkeld <[email protected]>
  • Loading branch information
MikaelMayer and robin-aws committed Jun 10, 2024
1 parent 5ad2413 commit 642e381
Show file tree
Hide file tree
Showing 8 changed files with 3,250 additions and 3,251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ static class SinglePassCompilerExtensions {
public abstract partial class SinglePassCodeGenerator {
// Dafny names cannot start with "_". Hence, if an internal Dafny name is problematic in the target language,
// we can prefix it with "_".
// However, for backends such as Rust which need special internal fields, we want to clearly
// disambiguate between compiler-generated names and user-defined names, hence this prefix.
protected virtual string InternalFieldPrefix => "_i_";
// This prefix can be overridden as necessary by backends.
protected virtual string InternalFieldPrefix => "_";
public DafnyOptions Options { get; }

/// <summary>
Expand Down
Loading

0 comments on commit 642e381

Please sign in to comment.