def initialized with alternatives (or) [message #987183] |
Sat, 24 November 2012 08:43 |
|
I need to define a def: which depends on two different alternatives in or.
Precisely I am validating a DSL and I need to retrieve the type of a variable. This depends on the where the variable was defined. It may be for instance a parameter of a method, a property of a class, a local variable. Then I thought to create a def, typed as ocl::OclElement, in the context of the Variable meta-class initialized by these three different possibilities in or. Am I doing the right thing?
Follow me on Twitter @andreasindico
|
|
|
Re: def initialized with alternatives (or) [message #987190 is a reply to message #987183] |
Sat, 24 November 2012 10:28 |
|
A better solution may be defining a set but It seems I am making some syntactical error.
I am doing something like
def: type: Set = {variable.<the first possible element>, variable.<the second possible element>}
or
def: type: Set{} = {variable.<the first possible element>, variable.<the second possible element>}
but in both the cases I get an error.
Also as the two elements of the set are mutually exclusive would this solution be feasible?
Follow me on Twitter @andreasindico
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03808 seconds