Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import liquidjava.rj_language.BuiltinFunctionPredicate;
import liquidjava.rj_language.Predicate;
import liquidjava.rj_language.parsing.ParsingException;
import liquidjava.utils.Utils;

import org.apache.commons.lang3.NotImplementedException;
import spoon.reflect.code.CtArrayRead;
import spoon.reflect.code.CtArrayWrite;
Expand Down Expand Up @@ -264,8 +266,10 @@ public <T> void visitCtLiteral(CtLiteral<T> lit) {
lit.putMetadata(REFINE_KEY, Predicate.createEquals(Predicate.createVar(WILD_VAR),
Predicate.createLit(lit.getValue().toString(), type)));

} else if (lit.getType().getQualifiedName().contentEquals("java.lang.String")) {
} else if (lit.getType().getQualifiedName().equals("java.lang.String")) {
// Only taking care of strings inside refinements
} else if (type.equals(Utils.NULL_TYPE)) {
// Skip null literals
} else {
throw new NotImplementedException(
String.format("Literal of type %s not implemented:", lit.getType().getQualifiedName()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class Utils {
public static final String SHORT = "short";
public static final String LONG = "long";
public static final String FLOAT = "float";
public static final String NULL_TYPE = "<nulltype>";

private static final Set<String> DEFAULT_NAMES = Set.of("old", "length", "addToIndex", "getFromIndex");

Expand Down