Type warnings on 8.0?

2018-02-15 Thread Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
>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.

Fixed by using a different approach in the compiler.

/grubba


Type warnings on 8.0?

2018-02-13 Thread Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
>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 8.0?

2018-02-13 Thread Stephen R. van den Berg
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).
-- 
Stephen.