Re: Doubt about compiler error of `has_value` with arrays

Chris Angelico <[email protected]> Fri, 14 Mar 2025 04:12:45 +1100
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAPTjJmoWzUvPxAkPh=SndtY5-9Ymgy_WWRKFuvKVh2UFsiFKNA@mail.gmail.com>
On Fri, 14 Mar 2025 at 03:31, Marcos Cruz <[email protected]> wrote:
> So somehow the problem happens when the array argument is a literal,
> both in hilfe and in a file.

When you use literals, yes, has_value expects that the argument makes
sense. But normally you'll be using a variable for one or both of its
arguments, so the expectation of the function will match your mental
expectation and it should be more reasonable.

ChrisA