Skip to content

Commit

Permalink
Delete redundant semantic in TypeClass.implicitConvTo
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanN7 authored and dlang-bot committed Jan 12, 2024
1 parent f130e09 commit e0e73f2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions compiler/src/dmd/mtype.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import dmd.denum;
import dmd.dscope;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dsymbolsem;
import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
Expand Down Expand Up @@ -5272,16 +5271,7 @@ extern (C++) final class TypeClass : Type

extern (D) MATCH implicitConvToWithoutAliasThis(Type to)
{
// Run semantic before checking whether class is convertible
ClassDeclaration cdto = to.isClassHandle();
if (cdto)
{
//printf("TypeClass::implicitConvTo(to = '%s') %s, isbase = %d %d\n", to.toChars(), toChars(), cdto.isBaseInfoComplete(), sym.isBaseInfoComplete());
if (cdto.semanticRun < PASS.semanticdone && !cdto.isBaseInfoComplete())
cdto.dsymbolSemantic(null);
if (sym.semanticRun < PASS.semanticdone && !sym.isBaseInfoComplete())
sym.dsymbolSemantic(null);
}
MATCH m = constConv(to);
if (m > MATCH.nomatch)
return m;
Expand Down

0 comments on commit e0e73f2

Please sign in to comment.