module m
type dt
integer i
contains
generic :: ASSIGNMENT(=) => assign
procedure, pass :: assign => myassign
generic :: ASSIGNMENT(=) => otherassign !! If commented out, it compiles successfully
procedure, pass :: otherassign => myassign !! If commented out, it compiles successfully
end type
contains
subroutine myassign(x,y)
class(dt), intent(out) :: x
integer, intent(in) :: y
x%i = y + 1
end subroutine
subroutine sub
type(dt) xdt
xdt = 5
end subroutine
end module
error: Semantic errors in assign08.f
./assign08.f:19:5: error: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(dt) and INTEGER(4)
xdt = 5
^^^^^^^