diff --git a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/IsValueOfTypeNode.java b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/IsValueOfTypeNode.java index 3c642028ad5ef..ba92058542f04 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/IsValueOfTypeNode.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/IsValueOfTypeNode.java @@ -64,7 +64,7 @@ boolean doLongCheck(Type expectedType, long payload) { boolean doDoubleCheck(Type expectedType, double payload) { var numbers = EnsoContext.get(this).getBuiltins().number(); if (Double.isNaN(payload)) { - return checkParentTypes(numbers.getNaN(), expectedType); + return checkParentTypes(numbers.getNan(), expectedType); } else { return checkParentTypes(numbers.getDecimal(), expectedType); } diff --git a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/TypeOfNode.java b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/TypeOfNode.java index f4f918d45b57c..5deee060c3b46 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/TypeOfNode.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/TypeOfNode.java @@ -9,15 +9,11 @@ import com.oracle.truffle.api.nodes.Node; import org.enso.interpreter.dsl.AcceptsError; import org.enso.interpreter.dsl.BuiltinMethod; -import org.enso.interpreter.epb.runtime.PolyglotExceptionProxy; import org.enso.interpreter.epb.runtime.PolyglotProxy; import org.enso.interpreter.runtime.EnsoContext; import org.enso.interpreter.runtime.builtin.Builtins; -import org.enso.interpreter.runtime.builtin.Number; -import org.enso.interpreter.runtime.callable.UnresolvedSymbol; import org.enso.interpreter.runtime.error.PanicException; import org.enso.interpreter.runtime.error.PanicSentinel; -import org.enso.interpreter.runtime.error.Warning; import org.enso.interpreter.runtime.error.WithWarnings; import org.enso.interpreter.runtime.library.dispatch.TypesLibrary; import org.enso.interpreter.runtime.number.EnsoBigInteger; @@ -39,7 +35,7 @@ public static TypeOfNode build() { Object doDouble(double value) { var number = EnsoContext.get(this).getBuiltins().number(); if (Double.isNaN(value)) { - return number.getNaN(); + return number.getNan(); } else { return number.getDecimal(); } @@ -118,7 +114,7 @@ Object doPolyglotNumber( } else if (interop.fitsInDouble(proxy)) { try { if (Double.isNaN(interop.asDouble(proxy))) { - return builtins.number().getNaN(); + return builtins.number().getNan(); } else { return builtins.number().getDecimal(); } diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Number.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Number.java index 8ab72a0a9fe35..3f58b921e8f25 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Number.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Number.java @@ -53,7 +53,7 @@ public Type getDecimal() { return decimal.getType(); } - public Type getNaN() { + public Type getNan() { return nan.getType(); } } diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/library/dispatch/DefaultDoubleExports.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/library/dispatch/DefaultDoubleExports.java index 03ad75941f421..e2e5db89823ec 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/library/dispatch/DefaultDoubleExports.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/library/dispatch/DefaultDoubleExports.java @@ -16,7 +16,7 @@ static boolean hasType(Double receiver) { @ExportMessage static Type getType(Double receiver, @CachedLibrary("receiver") TypesLibrary thisLib) { if (receiver.isNaN()) { - return EnsoContext.get(thisLib).getBuiltins().number().getNaN(); + return EnsoContext.get(thisLib).getBuiltins().number().getNan(); } else { return EnsoContext.get(thisLib).getBuiltins().number().getDecimal(); } diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/type/TypesFromProxy.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/type/TypesFromProxy.java index 9d4687cf55b66..c7fa3d850a119 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/type/TypesFromProxy.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/type/TypesFromProxy.java @@ -33,7 +33,7 @@ public static Type fromTypeSystem(Builtins builtins, String typeName) { case ConstantsGen.DATE_TIME -> builtins.dateTime(); case ConstantsGen.DURATION -> builtins.duration(); case ConstantsGen.DECIMAL -> builtins.number().getDecimal(); - case ConstantsGen.NAN -> builtins.number().getNaN(); + case ConstantsGen.NAN -> builtins.number().getNan(); case ConstantsGen.ERROR -> builtins.dataflowError(); case ConstantsGen.FUNCTION -> builtins.function(); case ConstantsGen.FILE -> builtins.file();