# Macro: no method matching size

**URL:** https://discourse.julialang.org/t/macro-no-method-matching-size/40311
**Category:** General Usage
**Tags:** macros
**Created:** [May 28, 2020, 2:57am UTC](https://discourse.julialang.org/t/macro-no-method-matching-size/40311 "2020-05-28T02:57:03Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![BMval](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmval/32/7647_2.png) [@BMval](https://discourse.julialang.org/u/BMval)
#### Post date: [May 28, 2020, 2:57am UTC](https://discourse.julialang.org/t/macro-no-method-matching-size/40311/1 "2020-05-28T02:57:03Z")

</div>

Would you help me with Macros

Why macros does not see functions: size() or length()?

Julia ver 1.1.1

```julia
macro test_macro(e::Expr)
	return (ones(size(e)[1]) .+ e)
end

MethodError: no method matching size(::Expr)
Closest candidates are:
  size(!Matched::BitArray{1}) at bitarray.jl:77
  size(!Matched::BitArray{1}, !Matched::Any) at bitarray.jl:81
  size(!Matched::Core.Compiler.StmtRange) at show.jl:1561
  ...

Stacktrace:
 [1] @test_macro(::LineNumberNode, ::Module, ::Expr) at ./In[96]:4774:

```

Julia ver 1.3 error

```julia
LoadError: MethodError: no method matching size(::Expr)
Closest candidates are:
  size(!Matched::BitArray{1}) at bitarray.jl:77
  size(!Matched::BitArray{1}, !Matched::Integer) at bitarray.jl:81
  size(!Matched::Core.Compiler.StmtRange) at show.jl:1598
  ...
in expression starting at G:\My Drive\Booth\Political_firms\Programs\Jl\TopicModeling_v1.jl:127
@test_macro3(::LineNumberNode, ::Module, ::Expr) at TopicModeling_v1.jl:133

```

---

_[View the full topic](https://discourse.julialang.org/t/macro-no-method-matching-size/40311)._
