You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below, the autocompletion of REPL suggests that Double.MAX_EXPONENT exists, but this generates an error at bottom.
EDIT: forgot to bracket code correctly.
cd ; PATH=~/jdk1.7.0_45/bin:~/scala-2.10.3/bin:$PATH scala
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> var e:Double=1
e: Double = 1.0
{code}Then the workaround suggested #7418:{code}
scala> e.<TabAutoComplete, the workaround suggested https://issues.scala-lang.org/browse/SI-7418>
% * + - / > >= asInstanceOf isInstanceOf toByte toChar toDouble toFloat toInt toLong toShort toString unary_+ unary_-
Then the autocompletion
scala> Double.<TabAutoComplete, which generates the bug>
MaxValue MinPositiveValue MinValue NaN NegativeInfinity PositiveInfinity asInstanceOf box isInstanceOf toString unbox MAX_EXPONENT MAX_VALUE MIN_EXPONENT
MIN_NORMAL MIN_VALUE NEGATIVE_INFINITY POSITIVE_INFINITY SIZE TYPE compare doubleToLongBits doubleToRawLongBits isInfinite isNaN longBitsToDouble parseDouble toHexString
valueOf
And the use, in disagreement with autocompletion
scala> Double.MAX_EXPONENT
<console>:8: error: value MAX_EXPONENT is not a member of object Double
Double.MAX_EXPONENT
^
I wanted to translate eps from matlab, in which eps is the minimal Double that can be added to 1.0, when I found this bug.
The text was updated successfully, but these errors were encountered:
@soc said:
The issue is that Scala imports everything in java.lang.*, but shadows things in many cases with their own types in scala._, and then gets confused about which things are accessible.
Below, the autocompletion of REPL suggests that Double.MAX_EXPONENT exists, but this generates an error at bottom.
EDIT: forgot to bracket code correctly.
Then the autocompletion
And the use, in disagreement with autocompletion
I wanted to translate eps from matlab, in which eps is the minimal Double that can be added to 1.0, when I found this bug.
The text was updated successfully, but these errors were encountered: