I have a package that creates a submodule. I would like to use the optimization level 1 for everything except the submodule. If I use the code
module MyPackage
   if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
       @eval Base.Experimental.@optlevel 1
   end
   module MySubmodule
   ....
   end
end
Does the optlevel get applied to the submodule MySubmodule? If yes, is there a way to avoid it?