@@ -151,6 +151,26 @@ class GenericTypes {
151151 }
152152 }
153153
154+ class PointerTypes {
155+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueType ) } (int* p) {{}}") ] public unsafe void PointerOfValueType ( int * p ) { }
156+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueType ) } (int?* p) {{}}") ] public unsafe void PointerOfNullableValueType ( int ? * p ) { }
157+
158+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueTupleOfValueType ) } ((int, int)* p) {{}}") ] public unsafe void PointerOfValueTupleOfValueType ( ( int , int ) * p ) { }
159+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueTupleOfNullableValueType ) } ((int, int?)* p) {{}}") ] public unsafe void PointerOfValueTupleOfNullableValueType ( ( int , int ? ) * p ) { }
160+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueTupleOfValueType ) } ((int, int)?* p) {{}}") ] public unsafe void PointerOfNullableValueTupleOfValueType ( ( int , int ) ? * p ) { }
161+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueTupleOfNullableValueType ) } ((int, int?)?* p) {{}}") ] public unsafe void PointerOfNullableValueTupleOfNullableValueType ( ( int , int ? ) ? * p ) { }
162+
163+ class ByRef {
164+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueType ) } (out int* p) {{}}") ] public unsafe void PointerOfValueType ( out int * p ) => throw null ;
165+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueType ) } (out int?* p) {{}}") ] public unsafe void PointerOfNullableValueType ( out int ? * p ) => throw null ;
166+
167+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueTupleOfValueType ) } (out (int, int)* p) {{}}") ] public unsafe void PointerOfValueTupleOfValueType ( out ( int , int ) * p ) => throw null ;
168+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfValueTupleOfNullableValueType ) } (out (int, int?)* p) {{}}") ] public unsafe void PointerOfValueTupleOfNullableValueType ( out ( int , int ? ) * p ) => throw null ;
169+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueTupleOfValueType ) } (out (int, int)?* p) {{}}") ] public unsafe void PointerOfNullableValueTupleOfValueType ( out ( int , int ) ? * p ) => throw null ;
170+ [ MemberDeclarationTestCase ( $ "public unsafe void { nameof ( PointerOfNullableValueTupleOfNullableValueType ) } (out (int, int?)?* p) {{}}") ] public unsafe void PointerOfNullableValueTupleOfNullableValueType ( out ( int , int ? ) ? * p ) => throw null ;
171+ }
172+ }
173+
154174 class NullabilityAnnotationOptions {
155175 [ MemberDeclarationTestCase ( $ "public void { nameof ( ValueType ) } (int p) {{}}", MemberEnableNullabilityAnnotations = false ) ]
156176 [ MemberDeclarationTestCase ( $ "public void { nameof ( ValueType ) } (int p) {{}}", MemberEnableNullabilityAnnotations = true ) ]
0 commit comments