<p dir="auto">Not sure if this is a duplicate, but, if I have a function like:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f()
    a = 1
    b = 1
    f(a b)
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span>()
    a <span class="pl-k">=</span> <span class="pl-c1">1</span>
    b <span class="pl-k">=</span> <span class="pl-c1">1</span>
    <span class="pl-c1">f</span>(a b)
<span class="pl-k">end</span></pre></div>
<p dir="auto">then I get an error like:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; include(&quot;test.jl&quot;)
ERROR: syntax: missing comma or ) in argument list
while loading /home/simon/Desktop/test.jl, in expression starting on line 1"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">include</span>(<span class="pl-s"><span class="pl-pds">"</span>test.jl<span class="pl-pds">"</span></span>)
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> <span class="pl-c1">missing</span> comma or ) <span class="pl-k">in</span> argument list
<span class="pl-k">while</span> loading <span class="pl-k">/</span>home<span class="pl-k">/</span>simon<span class="pl-k">/</span>Desktop<span class="pl-k">/</span>test<span class="pl-k">.</span>jl, <span class="pl-k">in</span> expression starting on line <span class="pl-c1">1</span></pre></div>
<p dir="auto">It would be nice if the line number matched up with the line where the error was actually encountered, rather than the start of the function.</p>
<p dir="auto">A code example where Julia does not abort gracefully:</p>
<p dir="auto"><code class="notranslate">(::Type{T})(x::Int) where {T&lt;:Integer} = println("crash")</code></p>
<p dir="auto">entered in the REPL leads to:</p>
<blockquote>
<p dir="auto">crashcrashcrashcrashcrash<br>
crash</p>
<p dir="auto">crash</p>
<p dir="auto">crash</p>
<p dir="auto">corrupted double-linked list</p>
<p dir="auto">signal (6): Aborted<br>
while loading no file, in expression starting on line 0</p>
</blockquote>
<p dir="auto">A variation that leads to a sigsegv</p>
<p dir="auto"><code class="notranslate">(::Type{T})(x::Int) where {T&lt;:Integer} = println(:crash)</code></p>
<p dir="auto">prints</p>
<blockquote>
<p dir="auto">crashcrashcrashcrashcrash<br>
crash</p>
<p dir="auto">crash</p>
<p dir="auto">crash</p>
<p dir="auto">signal (11): Segmentation fault<br>
while loading no file, in expression starting on line 0<br>
unknown function (ip: 0x7ff958329554)<br>
_ZN4llvm10AllocaInstC2EPNS_4TypeEPNS_5ValueEjRKNS_5TwineEPNS_11InstructionE at /home/picaud/ExternalSoftware/julia-d386e40c17/bin/../lib/julia/libLLVM-3.9.so (unknown line)<br>
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:5643<br>
....</p>
</blockquote>
<p dir="auto">My Julia version is:</p>
<blockquote>
<p dir="auto">Julia Version 0.6.2<br>
Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/d386e40c17d43b79fc89d3e579fc04547241787c/hovercard" href="https://github.com/JuliaLang/julia/commit/d386e40c17d43b79fc89d3e579fc04547241787c"><tt>d386e40</tt></a> (2017-12-13 18:08 UTC)<br>
Platform Info:<br>
OS: Linux (x86_64-pc-linux-gnu)<br>
CPU: Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz<br>
WORD_SIZE: 64<br>
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)<br>
LAPACK: libopenblas64_<br>
LIBM: libopenlibm<br>
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)</p>
</blockquote>
<p dir="auto">Obvioulsy this code is a non sense, the point is that Julia is really not happy with it.</p>