diff options
author | Michal Strehovsky <michals@microsoft.com> | 2018-08-02 16:57:58 +0300 |
---|---|---|
committer | Michal Strehovsky <michals@microsoft.com> | 2018-08-02 16:57:58 +0300 |
commit | 684bb89d4abeaf71a291414d0b960c2a333c4428 (patch) | |
tree | 442c482357eb26b4a5d6b0acf756d489d175b115 /src/ILCompiler.MetadataWriter | |
parent | 476627a87b0e348dab5872f6a4da59ff8dca3ca1 (diff) |
Allow illegal custom modifiers on generic constraints
Roslyn decided to do a breaking change to the ECMA-335 file format by generating an illegal custom modifier for the `unmanaged` constraint. The purpose of the modifier is to poison such types for old versions of the C# compiler (the modifier otherwise isn't necessary for the feature to work). This also poisons a lot of the .NET ecosystem too (breaking everything ranging from Mono to the C++/CLI compiler).
We need to update our stack to support this and unblock our customers.
[tfs-changeset: 1709243]
Diffstat (limited to 'src/ILCompiler.MetadataWriter')
-rw-r--r-- | src/ILCompiler.MetadataWriter/src/Internal/Metadata/NativeFormat/Writer/NativeFormatWriterGen.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ILCompiler.MetadataWriter/src/Internal/Metadata/NativeFormat/Writer/NativeFormatWriterGen.cs b/src/ILCompiler.MetadataWriter/src/Internal/Metadata/NativeFormat/Writer/NativeFormatWriterGen.cs index d503e858e..d4e199c70 100644 --- a/src/ILCompiler.MetadataWriter/src/Internal/Metadata/NativeFormat/Writer/NativeFormatWriterGen.cs +++ b/src/ILCompiler.MetadataWriter/src/Internal/Metadata/NativeFormat/Writer/NativeFormatWriterGen.cs @@ -2807,7 +2807,8 @@ namespace Internal.Metadata.NativeFormat.Writer Debug.Assert(Constraints.TrueForAll(handle => handle == null || handle.HandleType == HandleType.TypeDefinition || handle.HandleType == HandleType.TypeReference || - handle.HandleType == HandleType.TypeSpecification)); + handle.HandleType == HandleType.TypeSpecification || + handle.HandleType == HandleType.ModifiedType)); writer.Write(Constraints); writer.Write(CustomAttributes); } // Save |