Fsharp: Nameof on a generic type allows specifying bogus type arguments

Created on 16 Aug 2019  路  2Comments  路  Source: dotnet/fsharp

Given this:

type C<'T>() = class end

let name = nameof C<int, string, PhillipCarter>

The code compiles and name is given "C".

This should fail to compile, since C<int, string, PhillipCarter> is not valid.

Area-Compiler bug

Most helpful comment

Updated the issue :)

All 2 comments

Updated the issue :)

Thanks for this report. The fix is now part of the update to the preview feature at https://github.com/dotnet/fsharp/pull/8754

I'll close this for now since it's tracked in https://github.com/dotnet/fsharp/pull/8754

Was this page helpful?
0 / 5 - 0 ratings