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

ParserError with DataRowVersion #517

Open
wilsade opened this issue May 3, 2016 · 4 comments
Open

ParserError with DataRowVersion #517

wilsade opened this issue May 3, 2016 · 4 comments

Comments

@wilsade
Copy link

wilsade commented May 3, 2016

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

@fabiosfs
Copy link

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

@ibirite
Copy link

ibirite commented May 19, 2016

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

@wilsade
Copy link
Author

wilsade commented Jun 22, 2016

Hi.

Still no response?

Wilsade

@dgrunwald
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants