swp-uebersetzerbau-ss13 / common

Shared files between teams.
1 stars 0 forks source link

MemberType class should not be an inner class #23

Closed fub-frank closed 11 years ago

fub-frank commented 11 years ago

StructType constructor takes an arbitrary number of Member Types. These members are currently defined as inner class Member of class StructType.

As this inner class is not static (and can't be) instances of this class can not be instantiated within the StructType constructor. It would need to look something like this

StructType struct = new StructType(the_StructType_instance_to_create.new Member(...));

Of course the_StructType_instance_to_create is not available at this point.

Therefore Member type needs to be moved outside of the StructType class.