1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/fail13116.d(13): Error: this is not an lvalue 5 --- 6 */ 7 struct S 8 { notEvilS9 ref S notEvil() { return this; } // this should be accepted 10 } 11 class C 12 { evil()13 ref C evil() { return this; } // this should be rejected 14 } main()15void main() 16 { 17 } 18 19 /* 20 TEST_OUTPUT: 21 --- 22 fail_compilation/fail13116.d(28): Error: super is not an lvalue 23 --- 24 */ 25 class Base { } 26 class Derived : Base 27 { evil()28 ref Base evil() { return super; } // should be rejected 29 } 30