You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>const It = Base.Iterators
Base.Iterators
julia>import It: product # fine
but
julia>module M
const It = Base.Iterators
import It: product
end
ERROR: ArgumentError: Module It not found in current path.
Run `Pkg.add("It")` to install the It package.
On 9-day old master (0f95988), both result in the ArgumentError. I would expect both to work.
The text was updated successfully, but these errors were encountered:
tkoolen
changed the title
Import with module alias
ArgumentError while importing from a module alias
Feb 9, 2018
The new behavior is correct. In import X, X is not evaluated in the current lexical scope, but rather names a top-level package to be found in the load path (and using other package management mechanisms). Previously Main was special, in that it was effectively used to cache loaded packages. See #17997.
On 0.6.2:
but
On 9-day old master (0f95988), both result in the ArgumentError. I would expect both to work.
The text was updated successfully, but these errors were encountered: