waf / CSharpRepl

A command line C# REPL with syntax highlighting – explore the language, libraries and nuget packages interactively.
https://fuqua.io/CSharpRepl/
Mozilla Public License 2.0
2.95k stars 112 forks source link

Crash when editing line #328

Closed ogrim closed 8 months ago

ogrim commented 10 months ago

Version

C# REPL 0.6.6+ba21d409af4dce77f8be07f6a61cdb24cd19bb29

What happened?

I run the following line to create a byte array from a string:

"foo"u8.ToArray()

This works fine and I want to assign it to a variable, so moving to the start of the line I plan to type var x =

But once I hit v it crashes with Unhandled Exception: System.ArgumentException: Expected string or char literal (Parameter 'token').

If I type it out in order it works as expected: var x = "foo"u8.ToArray();

Minimally reproducible with:

""u8, go to the start of the line and hit v (or any other key for that matter).

See attached trace log for details: csharprepl-tracelog-2024-01-17.txt

kindermannhubert commented 8 months ago

Thanks for reporting. I was able to reproduce the problem with version you mention but not with current development version (not released yet). I suppose it has been solved by Roslyn packages upgrade (4.7.0 -> 4.8.0),