Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315482 - No error when parsing untyped variable
Summary: No error when parsing untyped variable
Status: CLOSED WONTFIX
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 16:11 EDT by Wayne CLA
Modified: 2012-05-29 13:22 EDT (History)
1 user (show)

See Also:


Attachments
Patch to fix the problem (2.88 KB, patch)
2010-06-02 16:11 EDT, Wayne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne CLA 2010-06-02 16:11:29 EDT
Build Identifier: CVS HEAD on June 2, 2010

If you have an untyped variable in an OCL expression and run it through HelperUtil.parseInvariant(), the OCLAnalyzer (AbstractOCLAnalyzer) fails to detect that the OCL is invalid.

A patch to fix the problem is attached.

Reproducible: Always
Comment 1 Wayne CLA 2010-06-02 16:11:59 EDT
Created attachment 170877 [details]
Patch to fix the problem
Comment 2 Ed Willink CLA 2010-06-02 17:01:22 EDT
Your patch generates an analysis error when a meta-model property has no type; not when an OCL variable has no type.

A missing meta-model property type is a meta-model validation error not an OCL analysis error.

The role of the analyzer is (now) to report errors that prevent creation of a consistent AST.

The role of the validator is (now) to report errors in the AST.

So this could be a validation check, but I would need to study the ramifications of OCL duplicating EMF validation. I suspect we get an irritating number of duplicate messages. OCL should diagnose the downstream consequence that some expression node has no type.

Please submit a test case if you can demonstrate that it is OCL rather than the meta-model that is wrong.
Comment 3 Ed Willink CLA 2011-05-27 02:58:07 EDT
Closing WONTFIXes.
Comment 4 Ed Willink CLA 2012-05-29 13:22:10 EDT
Closing all bugs resolved in Indigo.