class X is partial def main is shared .callSharedMembers1 .callSharedMembers2 .callInstanceMembers1 .callInstanceMembers2 def sharedMethod(i as int) as int is shared return i * 2 def sharedProp1 as String is shared return 'sharedProp1' def instanceMethod(b as bool) pass def instanceMethod(c as char) pass get prop1 as bool return true def callSharedMembers1 is shared assert .sharedProp1 == 'sharedProp1' assert .sharedProp2 == 'sharedProp2' assert .sharedMethod(3) == 6 assert .sharedMethod(3.0d) == 9.0d def callInstanceMembers1 is shared x = X() # from first partial x.instanceMethod(true) x.instanceMethod(c'c') assert x.prop1 # from this partial x.instanceMethod(3.0d) x.instanceMethod(5) assert x.prop2 class X is partial def sharedMethod(d as decimal) as decimal is shared return d * 3 def sharedProp2 as String is shared return 'sharedProp2' def instanceMethod(d as decimal) pass def instanceMethod(i as int) pass get prop2 as bool return true def callSharedMembers2 is shared assert .sharedProp1 == 'sharedProp1' assert .sharedProp2 == 'sharedProp2' assert .sharedMethod(3) == 6 assert .sharedMethod(3.0d) == 9.0d def callInstanceMembers2 is shared x = X() # from first partial x.instanceMethod(true) x.instanceMethod(c'c') # from this partial x.instanceMethod(3.0d) x.instanceMethod(5)