------- Comment #2 from janus at gcc dot gnu dot org  2010-07-12 09:02 -------
Note that the ambiguity is detected if both specifics are already defined in
the base class:

module m

  type :: t1
    integer :: i = 42
  contains
    procedure, pass :: make_integer
    procedure, pass :: make_integer_2
    generic, public :: extract => make_integer, make_integer_2
  end type t1

contains

  integer function make_integer (arg, arg2)
    class(t1), intent(in) :: arg
    integer :: arg2
    make_integer = arg%i * arg2
  end function make_integer

  integer function make_integer_2 (arg, arg2)
    class(t1), intent(in) :: arg
    integer :: arg2
    make_integer_2 = arg%i * arg2**2
  end function make_integer_2

end module m



    generic, public :: extract => make_integer, make_integer_2
                                 1
Error: 'make_integer' and 'make_integer_2' for GENERIC 'extract' at (1) are
ambiguous


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44917

Reply via email to