brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · b7b0ce7 Raw
33 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test name conflicts with type-bound generics3module m4  type base1(k)5    integer, kind :: k = 46    real x7   contains8    procedure, nopass :: tbp => sub19    generic :: gen1 => tbp10    generic :: gen2 => tbp11  end type12  type, extends(base1) :: ext113   contains14    procedure, nopass :: sub1, sub215    !ERROR: Type parameter, component, or procedure binding 'base1' already defined in this type16    generic :: base1 => sub117    !ERROR: Type bound generic procedure 'k' may not have the same name as a non-generic symbol inherited from an ancestor type18    generic :: k => sub119    !ERROR: Type bound generic procedure 'x' may not have the same name as a non-generic symbol inherited from an ancestor type20    generic :: x => sub121    !ERROR: Type bound generic procedure 'tbp' may not have the same name as a non-generic symbol inherited from an ancestor type22    generic :: tbp => sub123    generic :: gen1 => sub1 ! ok24    !ERROR: Generic 'gen2' may not have specific procedures 'tbp' and 'sub2' as their interfaces are not distinguishable25    generic :: gen2 => sub226  end type27 contains28  subroutine sub129  end30  subroutine sub231  end32end33