I've encountered some multimethod dispatch funnyness tonight. The included code which one would expect to produce a value of 1 ends up printing a value of 3.


Changing "a" and "b" to be regular Integer types seems to work. Can anybody shed any more light on this?

-c

.sub _main @MAIN
  .local pmc class
  .local pmc a
  .local pmc b

   subclass class, "Integer", "LispInteger"

   a = new "LispInteger"
   b = new "LispInteger"

   a = 1
   b = 1

   print a
   print " * "
   print b
   print " = "

   a = a * b

   print a
   print "\n"
  end
.end

Reply via email to