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

Bizarre error with macros and typeof #3807

Closed
dcjones opened this issue Jul 23, 2013 · 0 comments
Closed

Bizarre error with macros and typeof #3807

dcjones opened this issue Jul 23, 2013 · 0 comments
Assignees

Comments

@dcjones
Copy link
Contributor

dcjones commented Jul 23, 2013

I've tried to distill this down to the simplest case I could, but I'm still at a complete loss.

immutable Foo
    x
end

function f(foo::Foo)
    println("calling f")
    foo.x
end

macro g(ex)
    ex
end

function h()
    foo = Foo(1)
    @g typeof(f(foo))
end

h()

f gets called twice here somehow. It's weirdly specific to these circumstances: the typeof call, f returning a member of foo, @g typeof(f(foo)) being within a function, etc.

Also, this broke within the last week or so.

@ghost ghost assigned JeffBezanson Jul 24, 2013
KristofferC pushed a commit that referenced this issue Jul 26, 2024
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 6b4394914
New commit: e4a6723bf
Julia version: 1.12.0-DEV
Pkg version: 1.12.0
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@6b43949...e4a6723

```
$ git log --oneline 6b4394914..e4a6723bf
e4a6723bf Use `Base.TOML.Parser{Dates}` for TOML parsing w/ Dates support (#3938)
8c1f45d98 Append bundled depots to places where we empty it during tests (#3807)
2fdfabaf5 Test fixes (#3972)
34bb51ece fix bad depot path setting (#3971)
3715685b9 fix suggestions threshold for printing (#3968)
3f81d6c4d feat: add JULIA_PKG_GC_AUTO env var (#3642)
fad26d7f2 check `project_file` isa String (#3967)
8875120ad fix not hardcoding "Project.toml" when fixing up extensions in manifest (#3851)
90d42a1b0 Make manifest usage log errors non-fatal (#3962)
```

Co-authored-by: Dilum Aluthge <[email protected]>
lazarusA pushed a commit to lazarusA/julia that referenced this issue Aug 17, 2024
…#55258)

Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 6b4394914
New commit: e4a6723bf
Julia version: 1.12.0-DEV
Pkg version: 1.12.0
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@6b43949...e4a6723

```
$ git log --oneline 6b4394914..e4a6723bf
e4a6723bf Use `Base.TOML.Parser{Dates}` for TOML parsing w/ Dates support (JuliaLang#3938)
8c1f45d98 Append bundled depots to places where we empty it during tests (JuliaLang#3807)
2fdfabaf5 Test fixes (JuliaLang#3972)
34bb51ece fix bad depot path setting (JuliaLang#3971)
3715685b9 fix suggestions threshold for printing (JuliaLang#3968)
3f81d6c4d feat: add JULIA_PKG_GC_AUTO env var (JuliaLang#3642)
fad26d7f2 check `project_file` isa String (JuliaLang#3967)
8875120ad fix not hardcoding "Project.toml" when fixing up extensions in manifest (JuliaLang#3851)
90d42a1b0 Make manifest usage log errors non-fatal (JuliaLang#3962)
```

Co-authored-by: Dilum Aluthge <[email protected]>
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

No branches or pull requests

2 participants