diff options
Diffstat (limited to 'Dafny/DafnyAst.cs')
-rw-r--r-- | Dafny/DafnyAst.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Dafny/DafnyAst.cs b/Dafny/DafnyAst.cs index 39bfbdd3..021a0ba7 100644 --- a/Dafny/DafnyAst.cs +++ b/Dafny/DafnyAst.cs @@ -2236,10 +2236,13 @@ namespace Microsoft.Dafny { return name;
}
}
+ public static bool HasWildcardName(IVariable v) {
+ Contract.Requires(v != null);
+ return v.Name.StartsWith("_");
+ }
public static string DisplayNameHelper(IVariable v) {
Contract.Requires(v != null);
- string name = v.Name;
- return name.StartsWith("_") ? "_" : name;
+ return HasWildcardName(v) ? "_" : v.Name;
}
public string/*!*/ DisplayName {
get { return DisplayNameHelper(this); }
|