//TEST:INTERPRET(filecheck=CHECK): // Test for issue #7656: Compiler segfault with Ptr extension referring to This // This test ensures that the compiler doesn't segfault when 'This' is used in Ptr extensions public interface IThing { int f(This other); } public extension Ptr: IThing { public int f(This other) { // Test that 'This' refers to Ptr, not the pointed-to type int return sizeof(This) - sizeof(Ptr) + 1; } } void main() { Ptr p; Ptr other; int result = p.f(other); // CHECK: 1 printf("%d\n", result); }