Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344160

Summary: AnyException must be fully qualified
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: carrollk, jqian, jspadea, mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
TestDriver2 archived project file none

Description Joseph Vincens CLA 2011-04-28 12:08:00 EDT
I should be able to use AnyException with an import, but I get an error and must use the fully qualified type.
Comment 1 Matt Heitz CLA 2011-07-14 08:04:14 EDT
I don't know how this was fixed, but the problem seems to be gone.  The code below compiles without errors.

package me;

library scratch
	function x()
		throw new AnyException;
	end
end
Comment 2 Kathy Carroll CLA 2011-07-14 15:35:04 EDT
Created attachment 199700 [details]
TestDriver2 archived project file
Comment 3 Kathy Carroll CLA 2011-07-14 15:35:35 EDT
I have the latest loaded and I'm still seeing this problem.  I've attached an archived project file TestDriver2.zip.  It has my own example and function x getting errors on the EGL files:

IWN.VAL.3440.e 24/20 boolean002 - Invalid type AnyException. The type in an onException clause must be an exception record or the type egl.core.AnyException. At line 24 in file \TestDriver\eglsource\primitiveTypes\boolean002.egl

and

IWN.VAL.3444.e 5/15 scratch - The type anyexception must be an exception record. At line 5 in file \TestDriver\eglsource\me\scratch.egl
Comment 4 Joseph Vincens CLA 2011-07-14 15:57:16 EDT
Kathy is still seeing this problem. I don't think it's a language issue. It appears to be a compiler issue because we are getting the error during compilation.
Comment 5 Matt Heitz CLA 2011-07-14 16:18:25 EDT
I don't see the problem with Kathy's project, and neither does Joe, but let's keep this bug open for now.
Comment 6 Joseph Vincens CLA 2011-07-14 16:25:08 EDT
I imported 
cleaned the project and saw no problems.

I closed EDT
reopened EDT
clean and I see the problem on 2 egl files.
Comment 7 Matt Heitz CLA 2011-07-14 16:36:46 EDT
After many cleans, restarts, and closing & opening projects, I finally got it to happen too.
Comment 8 Justin Spadea CLA 2011-07-18 11:08:28 EDT
I found the cause of the problem, but after speaking with Paul this one is going to temporarily go on the backburner.

The cause is we have two versions of AnyExecption: egl.core.AnyException (the original type, defined as a Record) and egl.lang.AnyException (new to EDT, defined as an ExternalType). When using the unqualified version in your code, whichever IR was processed LAST will be present in the unqualified part name cache. The validation code expects it to be the original version; if the new version "wins" then you'll get validation errors, and only a restart will (potentially) fix it.

Paul said that egl.core.AnyException is probably going away. If this is true, then validation will need to be updated to work with egl.lang.AnyException.
Comment 9 Joseph Vincens CLA 2011-09-15 08:40:23 EDT
I no longer see this issue.
Comment 10 Lisa Lasher CLA 2011-10-20 15:01:19 EDT
changing target from Future to Final, since the problem is fixed in 070.