Bug 276883 - Compile error masked by warnings
Summary: Compile error masked by warnings
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2009-05-19 09:15 EDT by Michael Valenta CLA
Modified: 2019-06-15 17:09 EDT (History)
2 users (show)

See Also:


Attachments
I disabled dicouraged access warnings and the error appears properly (35.41 KB, image/png)
2009-05-19 09:15 EDT, Michael Valenta CLA
no flags Details
With discouraged access set to warning, the error is masked (35.63 KB, image/png)
2009-05-19 09:16 EDT, Michael Valenta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2009-05-19 09:15:06 EDT
A new compiler check was introduced in 3.5 RC1 that causes compile errors in code that calls an overloaded method where one of the methods have a parameter type that is not on the class path. This error is masked by warnings if there are warnings on the same line as the error (i.e. I have discouraged access warnings on the same line as the compile error and the line is decorated with the warning annotation.
Comment 1 Michael Valenta CLA 2009-05-19 09:15:43 EDT
Created attachment 136295 [details]
I disabled dicouraged access warnings and the error appears properly
Comment 2 Michael Valenta CLA 2009-05-19 09:16:23 EDT
Created attachment 136296 [details]
With discouraged access set to warning, the error is masked
Comment 3 Michael Valenta CLA 2009-05-19 09:17:42 EDT
Adding Kent to the CC list since he added the new compiler check in RC1.
Comment 4 Dani Megert CLA 2009-05-19 09:43:49 EDT
>A new compiler check was introduced in 3.5 RC1
I'm not aware of such a change (at least we didn't add any UI for that). Is this always enabled? Where exactly can I control this?
Comment 5 Kent Johnson CLA 2009-05-19 10:26:51 EDT
Dani, its not a new check but a fix in normal method lookup so we're 'more' compatible with javac's behaviour >= 1.5

In the past if we found a method with parameters that were an exact match, we would return it without resolving the parameter types (ie. not forcing them to find their supertypes).

Now with 1.5 we must check to see if the parameter type or ANY of its supertypes is a raw type. So when a type's hierarchy is not resolved, we skip the exact method match & do a normal method lookup which may cause us to find other possible methods that have parameter types which are not on the build path.

That is the case you're hitting here.
Comment 6 Dani Megert CLA 2009-05-19 10:34:11 EDT
OK, thanks. I quickly checked in my workspace whether I can make discouraged access warnings hide errors but no luck, so it seems to be related to this specific error.

Do you have auto-build on or off?
Comment 7 Michael Valenta CLA 2009-05-19 10:49:40 EDT
Auto-build is on.
Comment 8 Eclipse Genie CLA 2019-06-15 17:09:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.