- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will appreciate if someone could point out if it is my mistake or comelier issue
I have defined type point and overwritten default constructor.In the main program class point is available while I can not use it to define new types.
Here is an example
module point_class
implicit none
private
public :: point
type point
real :: x
real :: y
end type
interface point
module procedure constructor1
end interface
contains
function constructor1(x,y)
real, intent(in) :: x
real, intent(in) :: y
type(point) :: constructor1
constructor1%x = x
constructor1%y = y
end function
end module point_class
program example
use point_class
class(point), pointer :: p1 ! recognized
type particle
!type(point) :: coordinates ! works
type(point), pointer :: coordinates ! errorpoint is not a derived type name.
!class(point), pointer :: coordinates ! error point is not a derived type name.
end type particle
end program example
Thanks
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a compiler bug. I have reported it to the developers as issue DPD200179235. Thanks for the nice example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve.
Could you please provide a link to currently known issues? I could not find one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We do not have a single list of all known issues. Sometimes we create "known issue" knowledge base articles, but there isn't for this one.
In any event, this wasn't a known issue until you reported it.
In any event, this wasn't a known issue until you reported it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem has been fixed for a release later this year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve, looking forward for a new release.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page