public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: "Sudarshan S Chawathe" <chaw@eip10.org>
To: Sonny To <son.c.to@gmail.com>
Cc: Kawa mailing list <kawa@sourceware.org>
Subject: Re: warning when invoking method on java object
Date: Sun, 17 Sep 2017 14:45:00 -0000	[thread overview]
Message-ID: <6493.1505659499@vereq.eip10.org> (raw)
In-Reply-To: Your message of "Sun, 17 Sep 2017 07:34:11 -0700."             <CAJxjsJv9bBkMGyhuWaOmHeoPUp0zgVJKhv856xRngmfrnARA1g@mail.gmail.com>

I have found that declaring the types of a few key variables and
procedures (using the ::footype syntax) usually gives the
type-inferencing engine enough information to infer the needed types for
the remaining variables (typically generated from the earlier ones by
applying Java methods) and avoid the warnings.

Regards,

-chaw

> From: Sonny To <son.c.to@gmail.com>
> Date: Sun, 17 Sep 2017 07:34:11 -0700
> Subject: warning when invoking method on java object
> To: Kawa mailing list <kawa@sourceware.org>
> 
>  (context:startActivity i)
> 
> gives a warningi
> /dev/stdin:23:2: warning - no known slot 'startActivity' in java.lang.Object
> 
> it works but why is it giving a warning?
> 
> I could do
> ((as android.app.Application context):startActivity i)
> 
> and not get a warning but its more verbose. what is more idiomatic? I
> prefer the former but I am concern about getting warnings.
> 

      reply	other threads:[~2017-09-17 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 14:34 Sonny To
2017-09-17 14:45 ` Sudarshan S Chawathe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6493.1505659499@vereq.eip10.org \
    --to=chaw@eip10.org \
    --cc=kawa@sourceware.org \
    --cc=son.c.to@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).