Skip to content

Annoying assertion when typing code #3795

@cartermp

Description

@cartermp

In a hive, type something like:

let z = 

Eventually, you'll see something like this:

---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
   at Microsoft.FSharp.Compiler.ErrorLogger.newIsInstalled@450.Invoke(Unit unitVar0)
   at Microsoft.FSharp.Compiler.ErrorLogger.chkErrorLogger@451.DiagnosticSink(PhasedDiagnostic phasedError, Boolean isError)
   at Microsoft.FSharp.Compiler.LexFilter.LexFilterImpl.pushCtxt(TokenTup tokenTup, Context newCtxt)
   at Microsoft.FSharp.Compiler.LexFilter.LexFilterImpl.hwTokenFetch(Boolean useBlockRule)
   at Microsoft.FSharp.Compiler.LexFilter.loop@2262-33.Invoke(Unit unitVar0)
   at Microsoft.FSharp.Compiler.SourceCodeServices.Parser.createLexerFunction@1485.Invoke(a arg00)
   at Microsoft.FSharp.Compiler.SourceCodeServices.Parser.matchBraces@1513-1.Invoke(FSharpList`1 stack)
   at Microsoft.FSharp.Compiler.Lexhelp.reusingLexbufForParsing[a](LexBuffer`1 lexbuf, FSharpFunc`2 f)
   at Microsoft.FSharp.Compiler.Lexhelp.usingLexbufForParsing[a](LexBuffer`1 lexbuf, String filename, FSharpFunc`2 f)
   at Microsoft.FSharp.Compiler.SourceCodeServices.Parser.matchBraces(String source, String fileName, FSharpParsingOptions options, String userOpName)
   at <StartupCode$FSharp-Compiler-Private>.$Service.MatchBraces@2853.Invoke(Unit unitVar)
   at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@522.Invoke(AsyncParams`1 args)
   at <StartupCode$FSharp-Core>.$Control.loop@125-37.Invoke(FSharpFunc`2 action)
   at Microsoft.FSharp.Control.Trampoline.ExecuteAction(FSharpFunc`2 firstAction)
   at Microsoft.FSharp.Control.TrampolineHolder.Protect(FSharpFunc`2 firstAction)
   at Microsoft.FSharp.Control.TaskHelpers.continuation@1184.Invoke(Task`1 completedTask)
   at Microsoft.FSharp.Control.TaskHelpers.continueWith@1194.Invoke(Task`1 delegateArg0)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
---------------------------
Abort   Retry   Ignore   
---------------------------

I have no idea what could be causing this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions