File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -271,26 +271,24 @@ is an `intent(out)` argument.
271
271
272
272
``` fortran
273
273
program demo_copy_other
274
- use stdlib_hashmap_wrappers, only: &
275
- copy_other, get, other_type, set
274
+ use stdlib_hashmap_wrappers, only: copy_other, other_type
276
275
use iso_fortran_env, only: int8
277
276
implicit none
278
277
type(other_type) :: other_in, other_out
279
278
integer(int8) :: i
280
- class(*), allocatable :: dummy
281
279
type dummy_type
282
280
integer(int8) :: value(15)
283
281
end type
284
282
type(dummy_type) :: dummy_val
285
- do i= 1, 15
283
+ do i = 1, 15
286
284
dummy_val % value1(i) = i
287
285
end do
288
286
allocate(other_in % value, source=dummy_val)
289
287
call copy_other( other_in, other_out )
290
- select type(other_out) !there is an issue here, please check.
291
- typeis (dummy_type)
288
+ select type(out => other_out % value)
289
+ type is (dummy_type)
292
290
print *, "other_in == other_out = ", &
293
- all( dummy_val % value == other_out % value )
291
+ all( dummy_val % value == out % value )
294
292
end select
295
293
end program demo_copy_other
296
294
```
You can’t perform that action at this time.
0 commit comments