4 ! The B_TYPE_INSTANCE%SIZERETURN() typebound function used to be rejected on a
5 ! type mismatch because the function was resolved to A's SIZERETURN instead of
6 ! B's because of the ambiguity of the SIZERETURN name in the MAIN namespace.
8 ! Original testcase by someone <ortp21@gmail.com>
16 procedure :: sizeReturn
19 function sizeReturn( a_type_ )
22 class(a_type) :: a_type_
24 sizeReturn = a_type_%size
25 end function sizeReturn
34 procedure :: sizeReturn
37 function sizeReturn( b_type_ )
40 class(b_type) :: b_type_
42 sizeReturn = b_type_%size
43 end function sizeReturn
57 type(a_type) :: a_type_instance
58 type(b_type) :: b_type_instance
60 print *, a_type_instance%sizeReturn()
61 print *, b_type_instance%sizeReturn()
68 type(a_type) :: a_type_instance
69 type(b_type) :: b_type_instance
71 print *, a_type_instance%sizeReturn()
72 print *, b_type_instance%sizeReturn()