The same works with bool too. I am glad I don't have to write (bool)true :)

On Mon, Apr 17, 2017 at 1:19 PM Denny Vrandečić <[email protected]> wrote:

> Hm. If I try it in https://3v4l.org/WOTg0 I actually get good behavior
> for HHMV 3.12.14 - so it might be something problematic with our deployed
> HHMV version?
>
>
> On Mon, Apr 17, 2017 at 1:16 PM Denny Vrandečić <[email protected]>
> wrote:
>
>> Thanks for the suggestion, but I get exactly the same error message when
>> I try to typecast the 1 to int first.
>>
>> ‪On Mon, Apr 17, 2017 at 11:56 AM ‫יגאל חיטרון‬‎ <[email protected]>
>> wrote:‬
>>
>>> I'm not so good in this, but try {return (int)1;} . Maximum, I'm wrong.
>>> Igal
>>>
>>> On Apr 17, 2017 21:36, "Denny Vrandečić" <[email protected]> wrote:
>>>
>>> > I'm running into a weird problem, which made me reset my whole vagrant.
>>> >
>>> > I assume this is not strictly a MediaWiki issue, but probably an HHVM
>>> > problem, but maybe someone can help me here.
>>> >
>>> > So, if I start a fresh MediaWiki Vagrant installation, and the vagrant
>>> ssh
>>> > into the virtual machine, the fastest way to reproduce the issue is to
>>> > start hhvmsh and type
>>> >
>>> > function f():int { return 1; };
>>> >
>>> > =f()
>>> >
>>> > I get:
>>> >
>>> > Hit fatal : Value returned from function f() must be of type int, int
>>> given
>>> >
>>> >     #0 at [:1]
>>> >
>>> >     #1 f(), called at [:1]
>>> >
>>> >     #2 include(), called at [:1]
>>> >
>>> >
>>> > Any way to circumvent this (besides getting rid of the type hint,
>>> > obviously)? Update to a new HHVM version (According to
>>> Special:Version, the
>>> > HHMV version is 3.12.14 (srv)?
>>> > _______________________________________________
>>> > Wikitech-l mailing list
>>> > [email protected]
>>> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>> _______________________________________________
>>> Wikitech-l mailing list
>>> [email protected]
>>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>
>>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to