Been running into a compile-time problem lately and would appreciate some
community assistance debugging the issue.

I have a record called WrapArray that overloads WrapArray.this().

In WrapArray.this, there is switching logic that either: returns a member
variable 'domvalue' OR the program calls "this()" on a functor object
returning a value of type WrapArray. The switching logic then makes a
recursive call to WrapArray.this() which returns the WrapArray's underlying
array (domvalue).

record WrapArray {
  var dom ...
  var domtype ...
  var domvalue : [dom] dom_type;
  var op ... // class type
   ...

   proc this() : [dom] domtype {
         select this.function_type { // function_type is a class
            when 0 { return this.domvalue; }
            otherwise { var t = this.op(); return t(); } // var t is a
WrapArray, t() is a recursive call to "WrapArray.this" which should return
t.domvalue
         }
      }

      var toret : [value_domain] value_type = this.value;
      return toret;
   }

   ...
}

Compiler error looks like:

>>> In function 'this':
>>> internal error: number of actuals does not match number of formals
[callDestructors.cpp:1120]

Any tips or suggestions would be appreciated! Any suggestions with better
techniques for debugging these types of errors would also be appreciated!
(beyond using --devel at compile time)

--
ct-clmsn
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to