-
-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
On net6.0 only, with this class
public class ParseException : Exception
{
public ParseException(string message, in TextPosition position) : base(message)
{
Position = position;
}
public TextPosition Position { get; set; }
}
Try to create an instance like this:
Expression.Throw(Expression.New(typeof(ParseException).GetConstructors().First(), new [] { Expression.Constant("Message"), context.Position() } ))
Fails with a message similar to "invalid CLR ..." when invoking the lambda. Works fine when I remove the in marker in the arguments list. Works fine on netcoreapp3.1 and net5.0 in my tests.