| Summary: | TypeUtils.isValueType doesn't work when a generator passes in a record | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Joseph Vincens <jvincens> |
| Component: | EDT | Assignee: | Project Inbox <edt.doc-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | margolis |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
This happened because I had the EGL system part AnyValue file in my workspace because I was generating the system parts. This caused a 2nd set of irs to be created. So when a new record was created it uses a different ir that the 1 in the eglar, so the == fails. I spoke with Tim and if EGLAny or AnyValue is in the workspace bad things will happen because these are the base for most of our types. Maybe the solution is to document not to do this. Saul, We should document that the users should not use packages that collide with our system packages. Doing so could confuse our environment and cause confusing/unpredictable results. Please let me know if you need a list of all of our system packages. Paul is in place here: http://wiki.eclipse.org/EDT:Language_Overview03 can this bug report be closed now? |
In Java gen I passed a record into this method and it didn't find the record as a value type. I can't give you a testcase because I rewrote the generator. I found the problem was in ((EGLClass)type.getClassifier()).isSubtypeOf((EGLClass)getType(Type_AnyValue)). getType goes to the environment and gets AnyValue and goes into StructPart.isSubtypeOf, as the method iterates through the supertypes of record it gets to AnyValue this is not the same instance as the AnyAvlue object from the environment, so the == fails. for (StructPart superType : getSuperTypes()) { if (superType == part) { return true; } }