I'm using the 1.0.28 build of Fan. I can't seem to call the toDecimal() method on an instance declared as a type of Num:
toDecimal()
Num
Mass div(Num divisor) { return make(amount / divisor.toDecimal) } sys::Err: java.lang.NoSuchMethodError: fan.sys.Num.toDecimal()Lfan/sys/Decimal; quantity::Mass.mult (Mass.fan:26) TestMass_0::TestMass.main (/C:/dev/fan/quantity/TestMass.fan:17) sun.reflect.NativeMethodAccessorImpl.invoke0 (Unknown) sun.reflect.NativeMethodAccessorImpl.invoke (Unknown) sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown) java.lang.reflect.Method.invoke (Unknown) fan.sys.Method.invoke (Method.java:513) fan.sys.Method$MethodFunc.call (Method.java:216) fan.sys.Method.call (Method.java:178) fanx.tools.Fan.callMain (Fan.java:132) fanx.tools.Fan.executeFile (Fan.java:85) fanx.tools.Fan.execute (Fan.java:36) fanx.tools.Fan.run (Fan.java:225) fanx.tools.Fan$1.run (Fan.java:267) fan.sys.Thread$Val.run (Thread.java:453)
Looking at Num.java, it doesn't seem to declare the method signature for toDecimal(), which I suspect is the problem.
Num.java
thanks for the report
fixed for build 1.0.29
Login or Signup to reply.
jodastephen Wed 16 Jul 2008
I'm using the 1.0.28 build of Fan. I can't seem to call the
toDecimal()
method on an instance declared as a type ofNum
:Looking at
Num.java
, it doesn't seem to declare the method signature fortoDecimal()
, which I suspect is the problem.brian Thu 17 Jul 2008
thanks for the report
fixed for build 1.0.29