[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] [QVTO] Set contents not remembered between init and end

Hi,

Apparently, when using a set as result, it (or at least its contents) is not remembered between the init and end section, as shown in the sample program attached. I suspect this is a bug?

Kind regards,
Koen


modeltype UML uses uml("http://www.eclipse.org/uml2/2.1.0/UML";); transformation demo(); main() { map class_test(); map set_test(); }

mapping class_test() : UML::Class
{
  init {
    result := object Class { name := 'TestClass'; };
    log('class_test_init', result)
  }
  end {
    log('class_test_end', result);
    /* got the class back, as expected */
  }
}

mapping set_test() : Set(UML::Class)
{
  init {
    result := Set { object Class { name := 'TestClass'; }};
    log('set_test_init', result);
  }
  end {
    log('set_test_end', result);
    /* got [], but expected set with one class */
  }
}