Skip to content

Exception raised during pretty printing #8003

@jimfoye

Description

@jimfoye

Start new instance of FSI in Visual Studio 2019. Output:

Microsoft (R) F# Interactive version 10.7.0.0 for F# 4.7

Send this to FSI:

System.IntPtr.Zero.ToPointer()

Result:

Exception raised during pretty printing.
Please report this so it can be fixed.
Trace: System.ArgumentException: The type 'System.Void*' may not be used as a type argument.
at System.RuntimeType.ThrowIfTypeNeverValidGenericArgument(RuntimeType type)
at System.RuntimeType.SanityCheckGenericArguments(RuntimeType[] genericArguments, RuntimeType[] genericParamters)
at System.RuntimeType.MakeGenericType(Type[] instantiation)
at FSharp.Compiler.Interactive.Shell.Utilities.getAnyToLayoutCall(Type ty) in F:\workspace_work\1\s\src\fsharp\fsi\fsi.fs:line 82
at FSharp.Compiler.Interactive.Shell.FsiValuePrinter.PrintValue(FsiValuePrinterMode printMode, FormatOptions opts, Object x, Type ty) in F:\workspace_work\1\s\src\fsharp\fsi\fsi.fs:line 384
val it : voidptr =

Metadata

Metadata

Assignees

Labels

Area-FSIBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions