| Summary: | Comparing a scalar to a collection (which can never be true) should raise a warning at compile time | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Pierre-Charles David <pierre-charles.david> | ||||
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | stephane.begaudeau | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 176327 [details]
Patch v1.0
Patch contributed on head and available on Acceleo 3.1.0 M4. |
Build Identifier: 20100603-0907 Given a : A with a multi-valued EString feature f, the test [if (a.f = 'foo')] can never be true as e.f is a collection and 'foo' a scalar. If it can be detected at compile-time, raising a warning would help the user to fix it. Ideally a quick fix would be provided to rewrite the test as [if (a.f->includes('foo')] Reproducible: Always