Closed
Description
I found a few problems with csx parsing:
- #load directive with next expression start with string
#nullable enable
#load "ScriptHelper.csx"
"Hello world".Dump();
Produce error:
Could not find file '/Users/mark/Code/CSharpLab/ScriptHelper.csx"'.
Although it works:
#nullable enable
#load "ScriptHelper.csx"
;
"Hello world".Dump();
- using statement without parenthesis or a block on top level
using var connection = new SqliteConnection($"Data Source={dbPath}");
Produce errors:
error CS0103: The name 'connection' does not exist in the current context
error CS1002: ; expected
Although it works:
void Func()
{
using var connection = new SqliteConnection($"Data Source={dbPath}");
}
Metadata
Metadata
Assignees
Labels
No labels