-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxTree serialization fails trying to write VB date time literal #14943
Comments
Can we get more details about when this happens? @asecchia? |
How can it be more clear than the title of the issue? |
How does a user experience this? Does this crash VS whenever there is a VB file with a date constant? Should this be in RC instead of RC2? |
The bug is caused by my recent change to the serializer that is in master and not in RC. |
Ah, great! Thanks! |
I opened roslyn.sln and VS crashed (failfast) |
Reopening because this change was reverted as part of #15068 |
FYI @mattwar |
This only failed because of the serialization changes you also rolled back. |
This code:
Public Class C
Private _x As DateTime = #10/5/2015#
End Class
Causes this exception when the tree gets serialized:
System.InvalidOperationException: Cannot serialize type 'System.DateTime'.
at Roslyn.Utilities.StreamObjectWriter.WriteObject(Object instance)
at Roslyn.Utilities.StreamObjectWriter.WriteVariant(Variant value)
at Roslyn.Utilities.StreamObjectWriter.Emit()
at Roslyn.Utilities.StreamObjectWriter.WriteValue(Object value)
at Microsoft.CodeAnalysis.SyntaxNode.SerializeTo(Stream stream, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Host.AbstractSyntaxTreeFactoryService.RecoverableSyntaxRoot`1.d__6.MoveNext()
The text was updated successfully, but these errors were encountered: