BUG(V5.22.02, C# Program): Cannot execute text selection


//LINQPad_V5_22_02_Bug_CannotExecuteTextSelection.linq
void Main() {
42.Dump();
}

/** text selection 0 -> Cannot execute ... if in "C# Program"
from x in Enumerable.Range(start:char.MinValue,count:char.MaxValue-char.MinValue+1)
let c = (char)x
let isDigit = char.IsDigit(c)
where isDigit
select new{ x, c, isDigit }
**/
/** text selection 1 -> OK
from x in Enumerable.Range(start:char.MinValue,count:char.MaxValue-char.MinValue+1)
let c = (char)x
let isDigit = char.IsDigit(c)
where isDigit
select ( x, c, isDigit ) // <= instead of select new ...
**/
/** text selection 2 -> Cannot execute ...
from x in Enumerable.Range(start:char.MinValue,count:char.MaxValue-char.MinValue+1)
let c = (char)x
let isDigit = char.IsDigit(c)
where isDigit
select ( x, c, isDigit ) // <= instead of select new{ x, c, isDigit }
**/

/**
Error from text selection 0 and 2.
Occurs for "C# Program" only, not for "C# Statement(s)" or "C# Expression"
**//**
Cannot execute text selection: CS1003 Syntax error, ',' expected

CS1002 ; expected

CS1519 Invalid token '(' in class, struct, or interface member declaration

CS8124 Tuple must contain at least two elements.

CS1026 ) expected
**/

Comments

  • Thanks for the info. This should now been fixed in the latest beta:
    www.linqpad.net/download.aspx#beta
  • edited September 22
    experimental beta 5.23.04 is OK.
    Just seen:
    If the text selection is a rectangular block selection with non selected //s to the left, executing the selection sees the non selected //s except for the first one and thus fails.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!