Browse Source

Merge pull request #2911 from ElektroKill/fix/issue2910

Add support for record structs in `CSharpAmbience` (fixes #2910)
pull/2934/head
Daniel Grunwald 3 years ago committed by GitHub
parent
commit
cf72ac8010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs

4
ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs

@ -83,6 +83,10 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor
case ClassType.RecordClass: case ClassType.RecordClass:
writer.WriteKeyword(Roles.RecordKeyword, "record"); writer.WriteKeyword(Roles.RecordKeyword, "record");
break; break;
case ClassType.RecordStruct:
writer.WriteKeyword(Roles.RecordKeyword, "record");
writer.WriteKeyword(Roles.StructKeyword, "struct");
break;
default: default:
throw new Exception("Invalid value for ClassType"); throw new Exception("Invalid value for ClassType");
} }

Loading…
Cancel
Save