private_type_2.f90

来自「用于进行gcc测试」· F90 代码 · 共 25 行

F90
25
字号
! { dg-do compile }! PR16404 test 6 - If a component of a derived type is of a type declared to! be private, either the derived type definition must contain the PRIVATE! statement, or the derived type must be private.! Modified on 20051105 to test PR24534.!! Contributed by Joost VandeVondele <jv244@cam.ac.uk>MODULE TEST  PRIVATE  TYPE :: info_type   INTEGER :: value  END TYPE info_type  TYPE :: all_type! { dg-error "PRIVATE type and cannot be a component" }    TYPE(info_type) :: info  END TYPE  TYPE :: any_type! This is OK because of the PRIVATE statement.    PRIVATE    TYPE(info_type) :: info  END TYPE  public  all_type, any_typeEND MODULEEND! { dg-final { cleanup-modules "TEST" } }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?