# Using A: B does not put in scope exported B objects

**URL:** <https://discourse.julialang.org/t/using-a-b-does-not-put-in-scope-exported-b-objects/85537>\
**Category:** General Usage\
**Tags:** scope, modules\
**Created:** [August 9, 2022, 2:22pm UTC](https://discourse.julialang.org/t/using-a-b-does-not-put-in-scope-exported-b-objects/85537 "2022-08-09T14:22:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [August 9, 2022, 2:22pm UTC](https://discourse.julialang.org/t/using-a-b-does-not-put-in-scope-exported-b-objects/85537/1 "2022-08-09T14:22:42Z")

</div>

For example:

```julia
julia> module A
           module B
               export f
               f(x) = 1
           end
       end
Main.A

julia> using .A: B

julia> f(1)
ERROR: UndefVarError: f not defined
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

```

Don’t you think that `using .A: B` should bring into scope the methods exported by `B`?

---

<div class="post-metadata">

**Author:** ![danielmatz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielmatz/32/2285_2.png) [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Post date:** [August 9, 2022, 2:25pm UTC](https://discourse.julialang.org/t/using-a-b-does-not-put-in-scope-exported-b-objects/85537/2 "2022-08-09T14:25:10Z")

</div>

I think you want:

```julia
using .A.B

```

What you have now is only pulling in the name `B`.
