Skip to content

Commit

Permalink
[Compiler] Make sure that OBJECT -> INT conversion needs cast or /vo7
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertvanderHulst committed Jun 5, 2021
1 parent c90ceb4 commit 8194f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion XSharp/rebuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if exist Binaries\Debug rd Binaries\Debug /s /q
if exist Binaries\Public rd Binaries\Public /s /q
if exist Binaries\Release rd Binaries\Release /s /q
if exist Binaries\Obj rd Binaries\Obj /s /q
call restore.cmd
rem call restore.cmd
call build.cmd Debug
call build.cmd Public
call build.cmd Release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private bool XsHasImplicitCast(BoundExpression expression, TypeSymbol targetType

// do not throw an warnings for IIF() expressions with types that are too big
// for the LHS of the assignment
if (syntax.Kind() == SyntaxKind.ConditionalExpression && targetType.IsIntegralType())
if (syntax.Kind() == SyntaxKind.ConditionalExpression && targetType.IsIntegralType() && sourceType.IsIntegralType())
{
return true;
}
Expand Down

0 comments on commit 8194f27

Please sign in to comment.