Bug in interpreter or toolchain after change from to (and following)


I noticed that a C# library which I have used for years suddenly stopped to compile, after updating from version to The problem remains with any of the newer packages.

The library is available here:

The compiling error (unknown type T) has appeared in this line:
var nodes = valuesCache.Select(v => new Node(v));

As even the latest version has this bug, something must be wrong about the way C# code is interpreted / compiled. I use Visual Studio 2019 as IDE.

Has anybody an idea on how to solve this?

Any chance I could see the full project you are using?

Sure, please find attached the class file.

On compilation, it throws the error “Unknown type TNode<1>” in line 305.

Class1.cs (12.4 KB)

Thanks, logged as bugs://85844

Thanx, this is very strange indeed, it looks like a compiler bug. I’ll log an issue:

			var nodes = valuesCache.Select(v => new TNode<T>(v)); // E28 Unknown type "TNode<1>"
			var nodes2 = valuesCache.Select(v => new TNode<String>(v)); // E486 Parameter 1 is "T", should be "String", in call to TNode (String value)
			var nodes3 = valuesCache.Select(v => new TNode<String>("x")); // E28 Unknown type "TNode<1>"

bugs://85844 got closed with status fixed.