>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Not a valid 
>object type.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Expected: 
>function(void | mixed ... : object) | object | program.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:446: Warning: Got     : mixed.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:532: Warning: Invalid type.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:532: Warning: Expected: 
>function(void | mixed ... : object) | object | program | type(mixed).
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:532: Warning: Got     : mixed.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:593: Warning: Invalid type.
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:593: Warning: Expected: 
>function(void | mixed ... : object) | object | program | type(mixed).
>lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:593: Warning: Got     : mixed.
>
>I tried parsing the code, but the solution is non-obvious (at least to me).

The code is something like:

  private class _HMAC {
    // ...
    class State {
      // Code that uses stuff from the _HMAC class.
    }
  }

  mixed fun()
  {
    object(_HMAC.State) obj;    // Warning here.
  }

The problem is probably that State uses the parent pointer
(and thus isn't constant if indexed from an object(_HMAC)).
In this case it is indexed from the class, which renders a
constant, but the value is invalid for cloning the class,
so it is hidden from indexing in the runtime. However there
are some special cases for this in the compiler, but they
probably got broken when OPT_EXTERNAL_DEPEND was changed to
no longer be regarded as constant.

        /grubba
  • Type warnings on... Stephen R. van den Berg
    • Type warnin... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
      • Type wa... Henrik Grubbstrm (Lysator) @ Pike (-) developers forum

Reply via email to