- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the code below, I get some errors related to the structure constructor. Is it a compiler bug/ incomplete implementation of the type extension feature? Or Fortran 2003 requires nesting structure constructors up to the base type?
implicit none
type :: t1
integer :: a
end type
type, extends(t1) :: t2
integer :: b
end type
type(t2) :: t
t = t2(1, 1)
print *, t
end
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a bug/incomplete implementation. 11.1 (coming this week) compiles this ok.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a bug/incomplete implementation. 11.1 (coming this week) compiles this ok.

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