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.
271271
272272``` fortran
273273 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
276275 use iso_fortran_env, only: int8
277276 implicit none
278277 type(other_type) :: other_in, other_out
279278 integer(int8) :: i
280- class(*), allocatable :: dummy
281279 type dummy_type
282280 integer(int8) :: value(15)
283281 end type
284282 type(dummy_type) :: dummy_val
285- do i= 1, 15
283+ do i = 1, 15
286284 dummy_val % value1(i) = i
287285 end do
288286 allocate(other_in % value, source=dummy_val)
289287 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)
292290 print *, "other_in == other_out = ", &
293- all( dummy_val % value == other_out % value )
291+ all( dummy_val % value == out % value )
294292 end select
295293 end program demo_copy_other
296294```
You can’t perform that action at this time.
0 commit comments