# Derived type definition locations

**URL:** <https://fortran-lang.discourse.group/t/derived-type-definition-locations/8902>\
**Category:** Help\
**Created:** [November 29, 2024, 9:09am UTC](https://fortran-lang.discourse.group/t/derived-type-definition-locations/8902 "2024-11-29T09:09:45Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [November 30, 2024, 6:35pm UTC](https://fortran-lang.discourse.group/t/derived-type-definition-locations/8902/10 "2024-11-30T18:35:26Z")

</div>

Sorry for quoting only the part about the type definition. The answer how it can be propagated outside is specified in the `ASSOCIATE` semantics (see my previous post). Note that the function result type (i.e. the type of the evaluated selector) is public, so the associating entity has a known type:

```txt
          associating entity
          v
associate(f => foo())
               ^
               selector

```

I was surprised to discover this obscure corner of the language myself. Some related threads where I was exploring `ASSOCIATE` include:

- [Suppressing copy and assignment](https://fortran-lang.discourse.group/t/suppressing-copy-and-assignment/8636)
- [Should associate trigger automatic finalization?](https://fortran-lang.discourse.group/t/should-associate-trigger-automatic-finalization/2324/)

---

_[View the full topic](https://fortran-lang.discourse.group/t/derived-type-definition-locations/8902)._
