Via e-mail from Martin:
When I tested my last fix I noticed another problem, this time
serious, I'm afraid. Consider:
import java.net.*;
abstract public class Foo1 extends URLConnection {
Foo1() { super() }
}
This will complain as follows:
Foo1.java:4: operator <init> cannot be applied to
Foo1() { super() }
^
What happened is that my previous change to put in a special message
whenever an operator was not found went wrong. Remember that operators
and methods are represented internally the same way. When a matching
operator was not found, we used to get an error message which revealed
that fact. The recent fix for that complaint involved a test whether
the method we look for is in fact an operator. That test checked
whether the first character in the method name was a symbol. Braindead
as I was, I did not realize that "<init>" is regarded as an operator
by that test! I think if at all possible we need to correct this
now. The fix again involves only Resolve.java. I append the complete
diffs, which involve both the fix for protected static access and the
error message problem.
Cheers
-- Martin
[code patch omitted]
william.maddox@Eng 1999-10-06
When I tested my last fix I noticed another problem, this time
serious, I'm afraid. Consider:
import java.net.*;
abstract public class Foo1 extends URLConnection {
Foo1() { super() }
}
This will complain as follows:
Foo1.java:4: operator <init> cannot be applied to
Foo1() { super() }
^
What happened is that my previous change to put in a special message
whenever an operator was not found went wrong. Remember that operators
and methods are represented internally the same way. When a matching
operator was not found, we used to get an error message which revealed
that fact. The recent fix for that complaint involved a test whether
the method we look for is in fact an operator. That test checked
whether the first character in the method name was a symbol. Braindead
as I was, I did not realize that "<init>" is regarded as an operator
by that test! I think if at all possible we need to correct this
now. The fix again involves only Resolve.java. I append the complete
diffs, which involve both the fix for protected static access and the
error message problem.
Cheers
-- Martin
[code patch omitted]
william.maddox@Eng 1999-10-06