Fixes #7918.
TNode atom = pol ? l : l[0];
Kind ak = atom.getKind();
Assert(ak != LT && ak != GT && ak != LEQ);
- if ((ak == EQUAL && pol) || ak == GEQ)
+ if ((ak == EQUAL && pol && atom[0].getType().isRealOrInt()) || ak == GEQ)
{
// provide as < if negated >=
Node atomu;
regress1/strings/issue6913.smt2
regress1/strings/issue6973-dup-lemma-conc.smt2
regress1/strings/issue7677-test-const-rv.smt2
+ regress1/strings/issue7918-learned-rewrite.smt2
regress1/strings/kaluza-fl.smt2
regress1/strings/loop002.smt2
regress1/strings/loop003.smt2
--- /dev/null
+; COMMAND-LINE: --learned-rewrite
+; EXPECT: sat
+(set-logic ALL)
+(declare-fun v () String)
+(assert (= "" (str.substr v 0 1)))
+(check-sat)