penelopeysm / Shaymin.jl

a complete test package with a cute name
0 stars 0 forks source link

Addition #18

Open penelopeysm opened 3 weeks ago

penelopeysm commented 3 weeks ago

Minimal working example

julia> 1 + "1"
ERROR: MethodError: no method matching +(::Int64, ::String)

Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...)
   @ Base operators.jl:587
  +(::Real, ::Complex{Bool})
   @ Base complex.jl:319
  +(::Real, ::Complex)
   @ Base complex.jl:331
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

Description

Why does this error? Surely it should be "11"? Any sane, modern language knows to do this.

For example, I can run this code correctly, in my browser:

Screenshot 2024-09-30 at 16 05 48

Julia version info

versioninfo() ```julia Julia Version 1.10.5 Commit 6f3fdf7b362 (2024-08-27 14:19 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: macOS (arm64-apple-darwin22.4.0) CPU: 10 × Apple M1 Pro WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1) Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores) ```

Manifest

]st --manifest ```julia Project Shaymin v0.1.0 Status `~/test/Shaymin.jl/Manifest.toml` [d360d2e6] ChainRulesCore v1.25.0 [34da2185] Compat v4.16.0 [9a962f9c] DataAPI v1.16.0 [864edb3b] DataStructures v0.18.20 ⌅ [31c24e10] Distributions v0.24.18 [ffbed154] DocStringExtensions v0.9.3 ⌅ [1a297f60] FillArrays v0.11.9 [3587e190] InverseFunctions v0.1.17 ⌅ [92d709cd] IrrationalConstants v0.1.1 [692b3bcd] JLLWrappers v1.6.0 [2ab3a3ac] LogExpFunctions v0.3.28 [e1d29d7a] Missings v1.2.0 [bac558e1] OrderedCollections v1.6.3 [90014a1f] PDMats v0.11.31 [21216c6a] Preferences v1.4.3 [1fd47b50] QuadGK v2.11.1 [189a3867] Reexport v1.2.2 ⌅ [79098fc4] Rmath v0.7.1 [a2af1166] SortingAlgorithms v1.2.1 ⌅ [276daf66] SpecialFunctions v1.8.8 [82ae8749] StatsAPI v1.7.0 ⌅ [2913bbd2] StatsBase v0.33.21 ⌅ [4c63d2b9] StatsFuns v0.9.18 [efe28fd5] OpenSpecFun_jll v0.5.5+0 ⌅ [f50d1b31] Rmath_jll v0.4.3+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 [ade2ca70] Dates [f43a241f] Downloads v1.6.0 [7b1f6079] FileWatching [b77e0a4c] InteractiveUtils [b27032c2] LibCURL v0.6.4 [76f85450] LibGit2 [8f399da3] Libdl [37e2e46d] LinearAlgebra [56ddb016] Logging [d6f4376e] Markdown [ca575930] NetworkOptions v1.2.0 [44cfe95a] Pkg v1.10.0 [de0858da] Printf [3fa0cd96] REPL [9a3f8284] Random [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization [6462fe0b] Sockets [2f01184e] SparseArrays v1.10.0 [10745b16] Statistics v1.10.0 [4607b0f0] SuiteSparse [fa267f1f] TOML v1.0.3 [a4e569a6] Tar v1.10.0 [cf7118a7] UUIDs [4ec0a83e] Unicode [e66e0078] CompilerSupportLibraries_jll v1.1.1+0 [deac9b47] LibCURL_jll v8.4.0+0 [e37daf67] LibGit2_jll v1.6.4+0 [29816b5a] LibSSH2_jll v1.11.0+1 [c8ffd9c3] MbedTLS_jll v2.28.2+1 [14a3606d] MozillaCACerts_jll v2023.1.10 [4536629a] OpenBLAS_jll v0.3.23+4 [05823500] OpenLibm_jll v0.8.1+2 [bea87d4a] SuiteSparse_jll v7.2.1+1 [83775a58] Zlib_jll v1.2.13+1 [8e850b90] libblastrampoline_jll v5.11.0+0 [8e850ede] nghttp2_jll v1.52.0+1 [3f19e933] p7zip_jll v17.4.0+2 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m` ```
penelopeysm commented 3 weeks ago

\```

penelopeysm commented 3 weeks ago

`\````

penelopeysm commented 3 weeks ago
penelopeysm commented 3 weeks ago

```\``````