viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Add warning for parameterless patterns #273

Closed istvanrath closed 12 years ago

istvanrath commented 12 years ago

The generator processes such patterns (and generates much less code) entirely silently, without any warning.

Additionally, as parameterless patterns are suspicious, they should be marked by a warning.

bergmanngabor commented 12 years ago

The generator should yield much less code by design, as the methods that the generated matchers provide over the generic version are mostly concerned with the parametrization, which does not make sense in a parameterless pattern.

I could not reproduce your issue: factory() is there in the generated code. Perhaps you should show how you could produce the bug.

Introducing such a warning would make sense, however.

istvanrath commented 12 years ago

I could not reproduce your issue: factory() is there in the generated code.

Yes, but it (=the factory instance that it returns) doesn't have the usual methods available.

istvanrath commented 12 years ago

I checked again, and coudln't reproduce the previous issues, so the ticket is edited accordingly.

ujhelyiz commented 12 years ago

A validator has been added together with corresponding test cases.

By the way, editing an already filled issue by explicitely removing parts results in an interesting issue page.