<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; type Foo
       &quot;&quot;&quot;some docs&quot;&quot;&quot;
       Foo() = new()
       end

help?&gt; Foo
search: Foo floor pointer_from_objref OverflowError RoundFromZero FileMonitor

  No documentation found.

  Summary:

  type Foo &lt;: Any"><pre class="notranslate"><code class="notranslate">julia&gt; type Foo
       """some docs"""
       Foo() = new()
       end

help?&gt; Foo
search: Foo floor pointer_from_objref OverflowError RoundFromZero FileMonitor

  No documentation found.

  Summary:

  type Foo &lt;: Any
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MichaelHatherly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MichaelHatherly">@MichaelHatherly</a></p>
<p dir="auto">If you save the following code to a file and <code class="notranslate">include()</code> it, neither <code class="notranslate">?f</code> nor <code class="notranslate">?g</code> will print any documentation. Removing the <code class="notranslate">if</code> fixes the problem. This is annoying when only adding a function depending on the Julia version, notably when extending a Base function which may not exist in older releases.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if false
    &quot;&quot;&quot;
    Do something funny.
    &quot;&quot;&quot;
    f(x) = 1
else
    &quot;&quot;&quot;
    Do something sad.
    &quot;&quot;&quot;
    g(x) = 1
end"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-c1">false</span>
    <span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">    Do something funny.</span>
<span class="pl-s">    <span class="pl-pds">"""</span></span>
    <span class="pl-en">f</span>(x) <span class="pl-k">=</span> <span class="pl-c1">1</span>
<span class="pl-k">else</span>
    <span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">    Do something sad.</span>
<span class="pl-s">    <span class="pl-pds">"""</span></span>
    <span class="pl-en">g</span>(x) <span class="pl-k">=</span> <span class="pl-c1">1</span>
<span class="pl-k">end</span></pre></div>