Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #35231 improve type error message #35238

Merged
merged 8 commits into from
Mar 24, 2020
Merged

Conversation

ssikdar1
Copy link
Contributor

@ssikdar1 ssikdar1 commented Mar 23, 2020

Description

From issue #35231 , make the wording to the TypeError message clearer.

Testing Output

julia> isa(Int64, 1)
ERROR: TypeError: in isa, expected Type, got 1 instance of Int64
Stacktrace:
 [1] top-level scope at REPL[1]:1
julia> isa(Nothing, nothing)
ERROR: TypeError: in isa, expected Type, got nothing instance of Nothing
Stacktrace:
 [1] top-level scope at REPL[2]:1
julia> Union{Real, nothing}
ERROR: TypeError: in Union, expected Type, got nothing instance of Nothing
Stacktrace:
 [1] top-level scope at REPL[3]:1

Testing

julia> Base.runtests("errorshow")
Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
errorshow  (1) |        started at 2020-03-23T18:28:08.331
errorshow  (1) |     6.00 |   0.21 |  3.5 |     647.28 |   305.11

Test Summary: | Pass  Total
  Overall     |  205    205
    SUCCESS

from doc/

$ make html doctest=true
/Users/ssikdar1/julia/deps/tools/jlchecksum "/Users/ssikdar1/julia/deps/srccache/UnicodeData.txt"
cp "/Users/ssikdar1/julia/deps/srccache/UnicodeData.txt" UnicodeData.txt
Building HTML documentation.
/Users/ssikdar1/julia/usr/bin/julia --startup-file=no --color=yes /Users/ssikdar1/julia/doc/make.jl linkcheck= doctest=true buildroot=/Users/ssikdar1/julia texplatform=
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.

@StefanKarpinski StefanKarpinski merged commit f449765 into JuliaLang:master Mar 24, 2020
@ssikdar1 ssikdar1 deleted the errmsg branch March 24, 2020 23:48
oxinabox pushed a commit to oxinabox/julia that referenced this pull request Apr 8, 2020
ravibitsgoa pushed a commit to ravibitsgoa/julia that referenced this pull request Apr 9, 2020
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants