From: Shankar Unni <shankar@co...> - 2002-10-07 19:01:39
For the following code:
val =3D "abc";
HashMap p =3D new HashMap();
p.put("name", vel); // notice typo
I get the error:
// Error: Error in method invocation: Attempt to pass void argument
(position 1) to method: put : at Line: 3 : in file: <whatever>.
The "void argument" error threw me for a moment there - the real problem
is that the name "vel" is undefined, not that its value is "void".
Is it possible to emit a better error for this situation? (As opposed to
something like "foo =3D voidfunc()", for which this message *is*
On Mon, Oct 07, 2002 at 12:01:02PM -0700, Shankar Unni wrote:
> For the following code:
> val = "abc";
> HashMap p = new HashMap();
> p.put("name", vel); // notice typo
> I get the error:
> // Error: Error in method invocation: Attempt to pass void argument
> (position 1) to method: put : at Line: 3 : in file: <whatever>.
It should be possible to clarify the error message.
I'll add this to the list of things to do, but if you want to add it to
the bug list that would help insure that it gets addressed.