Skip to content
This repository was archived by the owner on Sep 24, 2020. It is now read-only.

ParserError with DataRowVersion #517

Description

@wilsade

Hi there.

I've got a parser error when parsing this code:

` [TestMethod]
public void WhenParsingThisCodeReturnNoError()
{
const string sampleCode = @"
using System.Data;
namespace Test
{
public class TestClass
{
void TestMethod()
{
DataRow row = null;

  row[""AnyField""] = row.RowState == DataRowState.Deleted ? 
    row[""OtherField"", DataRowVersion.Original] : 
    row[""SomeField""];
}

}
}";
var parser = new ICSharpCode.NRefactory.CSharp.CSharpParser();
var syntaxTree = parser.Parse(sampleCode);
Assert.IsTrue(syntaxTree.Errors.Count == 0, "Parser error");
}`

If I remove the DataRowVersion, the parse is OK:

row[""AnyField""] = row.RowState == DataRowState.Deleted ?
row[""OtherField""] :
row[""SomeField""];

Thanks,
Wilsade

Activity

  1. fabiosfs commented on May 18, 2016

    @fabiosfs

    It also happens in my app.
    Is it going to be fixed?

  2. ibirite commented on May 19, 2016

    @ibirite

    It seems that it happens only when you are using the ternary operator. But it's a bug, indeed.

  3. wilsade commented on Jun 22, 2016

    @wilsade
    Author

    Hi.

    Still no response?

    Wilsade

  4. dgrunwald commented on Jun 22, 2016

    @dgrunwald
    Member

    No, this is not going to be fixed. There is no one maintaining the NRefactory parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions