# Context parameters require opt-in even in calling modules?

**URL:** <https://discuss.kotlinlang.org/t/context-parameters-require-opt-in-even-in-calling-modules/30889>\
**Category:** Language Design\
**Created:** [December 15, 2025, 8:01pm UTC](https://discuss.kotlinlang.org/t/context-parameters-require-opt-in-even-in-calling-modules/30889 "2025-12-15T20:01:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Landei](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/landei/32/9407_2.png) [@Landei](https://discuss.kotlinlang.org/u/Landei)\
**Post date:** [December 15, 2025, 8:01pm UTC](https://discuss.kotlinlang.org/t/context-parameters-require-opt-in-even-in-calling-modules/30889/1 "2025-12-15T20:01:32Z")

</div>

So, as context parameters are still experimental, I have to opt-in (using the compiler flag `"-Xcontext-parameters"`) when writing functions using them - no surprise here.

But when using a function from such a module, I’m still forced to opt-in, even though I never use the `context(…)`syntax in the current module. This “infectious” behavior is really annoying, it effectively prevents libraries form introducing context parameters now, because it forces all callers to opt-in as well.

I think this implementation is quite restrictive, and that the opt-in should be only required when using the `context(…)`syntax, not for dealing with code from other modules.
