match hacking rules in swift

Change-Id: Iee02978f38ca020754f52ceaed6aa3684fa87bc9