Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358161 - Bogus error when comparing two enumeration values
Summary: Bogus error when comparing two enumeration values
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Paul Harmon CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 17:38 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Heitz CLA 2011-09-19 17:38:04 EDT
Last week I started getting a bogus error message on some code that compared two enumeration values.  It wasn't there when I first wrote the code, but appeared after a while.  I eventually switched to a new workspace, and the error was gone.  It just came back.

Here's a function where the error appears.
	function dictionaryOrderingDefault() { @Test }
		d dictionary;
		LogResult.assertTrue1( d.getOrdering() == OrderingKind.none );
	end

IWN.VAL.5089.e 42/26 TestFancyLanguageChanges - d.getOrdering() is not valid for compare to OrderingKind.none. At line 42 in file \unit\EGLSource\x\TestFancyLanguageChanges.egl	TestFancyLanguageChanges.egl	/unit/EGLSource/x	line 42	EDT Problem



Jing was getting a similar error so I put her on the CC list.



I noticed a stack trace in my error log.  It may not be related, since I can't make it happen again even after restarts and cleans, but I'm suspicious.


org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

[skip a hundred lines or so...]

Caused by: java.lang.ClassCastException: org.eclipse.edt.compiler.binding.NotFoundBinding incompatible with org.eclipse.edt.compiler.binding.EnumerationTypeBinding
	at org.eclipse.edt.compiler.internal.mof2binding.Mof2BindingBase.createAnnotationSubtypeFor(Mof2BindingBase.java:711)
	at org.eclipse.edt.compiler.internal.mof2binding.Mof2BindingPart.visit(Mof2BindingPart.java:533)
	... 188 more
Comment 1 Matt Heitz CLA 2011-09-20 07:57:33 EDT
The error disappeared after a while.  I'm sure it'll come back if I wait long enough, so I'm leaving this open.
Comment 2 Paul Harmon CLA 2011-09-26 14:23:23 EDT
I have made a few more tweeks to:
SystemEnvironment
DictionaryBinding

That will hopefully prevent this from happening. Please reopen if you can get the error to occur again.
Comment 3 Matt Heitz CLA 2011-10-04 14:36:11 EDT
Verified.