A cast expression with an error value right hand side can result in an internal error
For example, the following produces no visible error from the language extension, but encounters an internal error on dotnet build due to generation of a dummy value. At no point is the actual root cause reported, which is an undefined symbol within the cast expression right hand side:
// interpolation_handler is undefined, but the rest of the statement is valid:
_constructor = cast Semantic.Symbols.FUNCTION_GROUP(interpolation_handler.find_member("init")).functions |
.filter(f => f.arguments.count == 2)
.only();
A
cast
expression with an error value right hand side can result in an internal errorFor example, the following produces no visible error from the language extension, but encounters an internal error on
dotnet build
due to generation of a dummy value. At no point is the actual root cause reported, which is an undefined symbol within the cast expression right hand side:Internal error on
dotnet build
is