{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/28593","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/28593/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/28593/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/28593/events","html_url":"https://github.com/JuliaLang/julia/issues/28593","id":349729498,"node_id":"MDU6SXNzdWUzNDk3Mjk0OTg=","number":28593,"title":"Local variables in Macro defining abstract type","user":{"login":"nignatiadis","id":2933625,"node_id":"MDQ6VXNlcjI5MzM2MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/2933625?v=4","gravatar_id":"","url":"https://api.github.com/users/nignatiadis","html_url":"https://github.com/nignatiadis","followers_url":"https://api.github.com/users/nignatiadis/followers","following_url":"https://api.github.com/users/nignatiadis/following{/other_user}","gists_url":"https://api.github.com/users/nignatiadis/gists{/gist_id}","starred_url":"https://api.github.com/users/nignatiadis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nignatiadis/subscriptions","organizations_url":"https://api.github.com/users/nignatiadis/orgs","repos_url":"https://api.github.com/users/nignatiadis/repos","events_url":"https://api.github.com/users/nignatiadis/events{/privacy}","received_events_url":"https://api.github.com/users/nignatiadis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-11T12:04:55Z","updated_at":"2018-08-11T12:04:55Z","closed_at":null,"author_association":"NONE","body":"Consider the following two macros for defining parametric concrete or abstract types:\r\n\r\n```jl\r\nmacro m1()\r\n    quote\r\n        abstract type A{S<:Real, V<:AbstractVector{S}} end\r\n    end\r\nend\r\n\r\nmacro m2()\r\n    quote\r\n        struct A{S<:Real, V<:AbstractVector{S}} end\r\n    end\r\nend\r\n```\r\nWhile they are very similar, their behavior appears to be inconsistent:\r\n```jl\r\n@macroexpand @m1\r\n```\r\n\r\n> quote\r\n    #= REPL[17]:3 =#\r\n    abstract type (Main.A){Main.S <: Main.Real, Main.V <: (Main.AbstractVector){Main.S}} end\r\nend\r\n\r\n```jl\r\n@macroexpand @m2\r\n```\r\n> quote\r\n    #= REPL[18]:3 =#\r\n    struct A{#1#S <: Main.Real, #2#V <: (Main.AbstractVector){#1#S}}\r\n        #= REPL[18]:3 =#\r\n    end\r\nend\r\n\r\nBelow the `versioinfo` which is 0.7, but @mauro3  (who wrote the above minimal example) reproduced this on 1.0 as well.\r\n\r\n> Julia Version 0.7.0\r\nCommit a4cb80f3ed (2018-08-08 06:46 UTC)\r\nPlatform Info:\r\n  OS: macOS (x86_64-apple-darwin14.5.0)\r\n  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz\r\n  WORD_SIZE: 64\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-6.0.0 (ORCJIT, ivybridge)\r\n\r\n"}}
{"actor":{"display_login":"nignatiadis"}}