-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds unittest for Error message for dummy procedure argument. #200
TODO: probably the workspace/symbol test will need to be moved into a separate directory because it has to be edited every time a new test is being added
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module test_int | ||
|
||
implicit none | ||
|
||
contains | ||
|
||
subroutine foo(f, arg2) | ||
interface | ||
function f(x) | ||
real, intent(in) :: x | ||
real :: f | ||
end function | ||
end interface | ||
integer, intent(in) :: arg2 | ||
real :: y | ||
y = 1. | ||
print*, f(y) | ||
end subroutine foo | ||
|
||
function foo2(f, g, h) result(arg3) | ||
interface | ||
function f(x) result(z) | ||
real, intent(in) :: x | ||
real :: z | ||
end function | ||
function g(x) result(z) | ||
real, intent(in) :: x | ||
real :: z | ||
end function | ||
end interface | ||
interface | ||
function h(x) result(z) | ||
real, intent(in) :: x | ||
real :: z | ||
end function h | ||
end interface | ||
real :: y | ||
real :: arg3 | ||
y = 1. | ||
arg3 = f(g(h(y))) | ||
end function foo2 | ||
|
||
end module test_int |