JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
274 stars 33 forks source link

MethodError: no method matching `isless(::Int64, ::Nothing)` #341

Closed pchintalapudi closed 1 year ago

pchintalapudi commented 1 year ago

MWE:

premc@DESKTOP-0UND5EL:/mnt/c/Users/premc/Documents/julia$ ./julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-DEV.235 (2023-08-06)
 _/ |\__'_|_|_|\__'_|  |  Commit 9f9e989f24 (1 day old master)
|__/                   |

julia> ./julia
┌ Error: JuliaSyntax parser failed — falling back to flisp!
│   exception =
│    MethodError: no method matching isless(::Int64, ::Nothing)
│ 
│    Closest candidates are:
│      isless(::Missing, ::Any)
│       @ Base missing.jl:87
│      isless(::Any, ::Missing)
│       @ Base missing.jl:88
│      isless(::Real, ::AbstractFloat)
│       @ Base operators.jl:178
│      ...
│ 
│    Stacktrace:
│      [1] <(x::Int64, y::Nothing)
│        @ Base ./operators.jl:352
│      [2] >(x::Nothing, y::Int64)
│        @ Base ./operators.jl:378
│      [3] core_parser_hook(code::String, filename::String, lineno::Int64, offset::Int64, options::Symbol)
│        @ Base.JuliaSyntax /mnt/c/Users/premc/Documents/julia/base/JuliaSyntax/src/hooks.jl:212
│      [4] invoke_in_world(::UInt64, ::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
│        @ Base ./essentials.jl:921
│      [5] invoke_in_world(::UInt64, ::Any, ::Any, ::Vararg{Any})
│        @ Base ./essentials.jl:918
│      [6] (::Base.JuliaSyntax.var"#invoke_fixedworld#120"{Base.JuliaSyntax.var"#invoke_fixedworld#117#121"{typeof(Base.JuliaSyntax.core_parser_hook), UInt64}})(::String, ::Vararg{Any}; kws::@Kwargs{})
│        @ Base.JuliaSyntax /mnt/c/Users/premc/Documents/julia/base/JuliaSyntax/src/hooks.jl:118
│      [7] (::Base.JuliaSyntax.var"#invoke_fixedworld#120"{Base.JuliaSyntax.var"#invoke_fixedworld#117#121"{typeof(Base.JuliaSyntax.core_parser_hook), UInt64}})(::String, ::Vararg{Any})
│        @ Base.JuliaSyntax /mnt/c/Users/premc/Documents/julia/base/JuliaSyntax/src/hooks.jl:117
│      [8] _parse_string(text::String, filename::String, lineno::Int64, index::Int64, options::Symbol)
│        @ Base.Meta ./meta.jl:200
│      [9] #parseall#6
│        @ Base.Meta ./meta.jl:294 [inlined]
│     [10] parseall
│        @ Base.Meta ./meta.jl:293 [inlined]
│     [11] _parse_input_line_core
│        @ Base ./client.jl:174 [inlined]
│     [12] #parse_input_line#1032
│        @ Base ./client.jl:192 [inlined]
│     [13] parse_input_line
│        @ Base ./client.jl:189 [inlined]
│     [14] (::REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider})(x::Any)
│        @ REPL /mnt/c/Users/premc/Documents/julia/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1075
│     [15] #invokelatest#2
│        @ Base ./essentials.jl:887 [inlined]
│     [16] invokelatest
│        @ Base ./essentials.jl:884 [inlined]
│     [17] (::REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
│        @ REPL /mnt/c/Users/premc/Documents/julia/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:901
│     [18] #invokelatest#2
│        @ Base ./essentials.jl:887 [inlined]
│     [19] invokelatest
│        @ Base ./essentials.jl:884 [inlined]
│     [20] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit /mnt/c/Users/premc/Documents/julia/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2656
│     [21] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
│        @ REPL /mnt/c/Users/premc/Documents/julia/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1308
│     [22] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
│        @ REPL /mnt/c/Users/premc/Documents/julia/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:384
│   offset = 0
│   code = "./julia"
└ @ Base.JuliaSyntax /mnt/c/Users/premc/Documents/julia/base/JuliaSyntax/src/hooks.jl:258
ERROR: syntax: "./" is not a unary operator
Stacktrace:
 [1] top-level scope
   @ none:1

julia> versioninfo()
Julia Version 1.11.0-DEV.235
Commit 9f9e989f24 (2023-08-06 04:35 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, icelake-client)
  Threads: 1 on 8 virtual cores