Another compiler assertion error - Unexpected value 'LessDerived' of type...

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
pemo18
Posts: 81
Joined: Fri Apr 27, 2018 10:38 am
Location: Germany

Another compiler assertion error - Unexpected value 'LessDerived' of type...

Post by pemo18 »

Hello XSharp-Team,

I am using Bandol RC1.

I am hit with another compiler assertion - this time in a very small project (Console Application).

With Bandol Beta 8 the assertion error was not speficied - the project compiled just with "1 Fehler". With Bandol RC1 the error is listed in the Visual Studio error list:

XSC(0,0): error XS9999: An internal compiler error has occurred: 'Unexpected value 'LessDerived' of type 'LanguageService.CodeAnalysis.XSharp.MemberResolutionKind'', bei LanguageService.CodeAnalysis.XSharp.OverloadResolutionResult`1.AssertNone(MemberResolutionKind kind) in C:XSharpDevRoslynSrcCompilersCSharpPortableBinderSemanticsOverloadResolutionOverloadResolutionResult.cs:Zeile 1412.

The strange thing about this is the fact that the project compiled without any errors until I did make some small changes to the source. I guess that one these small changes is reponsible for the assertion.

Kind regards,
Peter
Attachments
XSharp_CompilerAssertion_LessDerivedType.png
XSharp_CompilerAssertion_LessDerivedType.png (22.77 KiB) Viewed 305 times
User avatar
pemo18
Posts: 81
Joined: Fri Apr 27, 2018 10:38 am
Location: Germany

Another compiler assertion error - Unexpected value 'LessDerived' of type...

Post by pemo18 »

Looks like I somehow deleted the variable declaration:

Static Method ExecuteGlobalReader(SqlText as String) as DbDataReader
Local dr as DbDataReader
// if the following command is missing - the result is a compiler assertion
var sqlCommand := EFDbConnection:CreateCommand()
sqlCommand:CommandText := SqlText
dr := (DbDataReader)sqlCommand:ExecuteReader()
return dr

So case closed.

In the final version of the XSharp compiler there should be a different kind of error message.

Besides that the XSharp Compiler is really impressive!

Regards,
Peter
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Another compiler assertion error - Unexpected value 'LessDerived' of type...

Post by Chris »

Hi Peter,

Unfortunately I could not reproduce the problem with the info you provided. It is of course a compiler bug that you get an assertion failed instead of a normal compiler error, but in order to fix it in a later build, we need some way to reproduce it so we can find exactly what's causing it. If you could prepare and pot a complete sample that shows this error happening, it wold be greatly appreciated! Of course I do realize it would take probably considerable time to do that and time is scarce for everybody...
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply