@@ -1363,11 +1363,6 @@ private Expression resolveUFCSProperties(Scope* sc, Expression e1, Expression e2
13631363 auto arguments = new Expressions(1);
13641364 (*arguments)[0] = eleft;
13651365 e = new CallExp(loc, e, arguments);
1366-
1367- // https://issues.dlang.org/show_bug.cgi?id=24017
1368- if (sc.flags & SCOPE.debug_)
1369- e.isCallExp().inDebugStatement = true;
1370-
13711366 e = e.expressionSemantic(sc);
13721367 return e;
13731368 }
@@ -13364,6 +13359,11 @@ version (IN_LLVM)
1336413359 error(exp.loc, "compare not defined for complex operands");
1336513360 return setError();
1336613361 }
13362+ else if (t1.isTypeFunction() || t2.isTypeFunction())
13363+ {
13364+ error(exp.loc, "comparison is not defined for function types");
13365+ return setError();
13366+ }
1336713367 else if (t1.ty == Taarray || t2.ty == Taarray)
1336813368 {
1336913369 error(exp.loc, "`%s` is not defined for associative arrays", EXPtoString(exp.op).ptr);
@@ -13684,6 +13684,12 @@ version (IN_LLVM)
1368413684 return;
1368513685 }
1368613686
13687+ if (t1.isTypeFunction() || t2.isTypeFunction())
13688+ {
13689+ error(exp.loc, "operator `==` is not defined for function types");
13690+ return setError();
13691+ }
13692+
1368713693 if (auto tv = t1.isTypeVector())
1368813694 exp.type = tv.toBooleanVector();
1368913695
@@ -13745,6 +13751,12 @@ version (IN_LLVM)
1374513751 if (exp.e2.op == EXP.call)
1374613752 exp.e2 = (cast(CallExp)exp.e2).addDtorHook(sc);
1374713753
13754+ if (exp.e1.type.isTypeFunction() || exp.e2.type.isTypeFunction())
13755+ {
13756+ error(exp.loc, "operator `is` is not defined for function types");
13757+ return setError();
13758+ }
13759+
1374813760 if (exp.e1.type.toBasetype().ty == Tsarray ||
1374913761 exp.e2.type.toBasetype().ty == Tsarray)
1375013762 deprecation(exp.loc, "identity comparison of static arrays "
0 commit comments