Skip to content

Commit

Permalink
Fix: Inconsistent printing of type synonyms that use builtins (#789)
Browse files Browse the repository at this point in the history
Fixes #775.

Co-authored-by: Shaz Qadeer <[email protected]>
  • Loading branch information
zafer-esen and shazqadeer authored Sep 25, 2023
1 parent 1e7a4f5 commit a74325d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Source/Core/AST/AbsyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3774,16 +3774,7 @@ public override void Emit(TokenTextWriter stream, int contextBindingStrength)
{
//Contract.Requires(stream != null);
stream.SetToken(this);
// If this type has a "builtin" attribute, use the corresponding user-provided string to represent the type.
string builtin = GetBuiltin();
if (builtin != null)
{
stream.Write(builtin);
}
else
{
EmitCtorType(this.Decl.Name, Arguments, stream, contextBindingStrength);
}
EmitCtorType(this.Decl.Name, Arguments, stream, contextBindingStrength);
}

internal static void EmitCtorType(string name, List<Type> args, TokenTextWriter stream, int contextBindingStrength)
Expand Down

0 comments on commit a74325d

Please sign in to comment.