brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · 1ac76c1 Raw
31 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3  type t4   contains5    procedure :: tweedledee6    generic :: operator(.ga.) => tweedledee7    generic, private :: operator(.gb.) => tweedledee8  end type9  interface operator(.gc.)10    module procedure tweedledum11  end interface12 contains13  integer function tweedledee(x,y)14    class(t), intent(in) :: x, y15    tweedledee = 116  end17  integer function tweedledum(x,y)18    class(t), intent(in) :: x, y19    tweedledum = 220  end21end22 23module badDueToAccessibility24  !ERROR: Generic 'OPERATOR(.ga.)' may not have specific procedures 'tweedledum' and 't%tweedledee' as their interfaces are not distinguishable25  use m, operator(.ga.) => operator(.gc.)26end27 28module goodDueToInaccessibility29  use m, operator(.gb.) => operator(.gc.)30end31