title: What's the use for Kotlin's @JvmSynthetic on a file target?
body: <p>The <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-synthetic/" rel="nofollow noreferrer"><code>@JvmSynthetic</code></a> annotation is allowed to be used on a file, but I can't figure out what the purpose of this would be.</p>
  <p>I was hoping I could hide a file containing a bunch of Kotlin-only extension methods from Java users, but that doesn't seem to be the case:</p>
  <pre class="lang-kotlin prettyprint-override"><code>// Extensions.kt
  
  @file:JvmSynthetic
  
  @JvmSynthetic
  fun Foo.mySyntheticExtension() = ...
  fun Foo.myExtension() = ...
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>// Java usage
  
  // This doesn't compile (as expected)
  Extensions.mySyntheticExtension(foo);
  
  // This compiles fine, so @JvmSynthetic on a file does not trickle down to all its functions
  Extensions.myExtension(foo);
  </code></pre>
  <p>Even without the non-synthetic method Java users still see the cluttering <code>ExtensionsKt</code> class, although it appears empty to them.</p>
  <p>If <code>@file:JvmSynthetic</code> doesn't hide the file('s generated class) from Java, nor trickles down the synthetic status to all functions in it, what is its intended purpose?</p>