Skip to content

'with' or quick binding operator bug #136

Description

@D0ctorWh0

Hi!

I came across your project and it looks very interesting. I played a bit with it and get an error when trying to use 'with' and quick binding operator.

When I write this EC# code

Point p = new Point(0, 0);
var point2 = new Point(2,2);

with (p)
{
    .X = 0;
    .Y = 1;
}

it generates valid C# code

Point p = new Point(0, 0);
var point2 = new Point(2, 2);
{
var tmp_10 = p;
tmp_10.X = 0;
tmp_10.Y = 1;
}

But when I try this EC# code

Point p = new Point(0, 0);
new Point(2,2)::point2;

with (p)
{
    .X = 0;
    .Y = 1;
}

it generates invalid C# code

Point p = new Point(0, 0);
var point2 = new Point(2, 2);
point2;
{
var tmp_10 = p;
tmp_10.X = 0;
tmp_10.Y = 1;
}

P.S. Why keeping braces from 'with' is C# code?

I tried to use only quick binding operator and it gives some error. Am I using it wrong?

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions