[Issue 7330] Local imports are order sensitive

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 24 02:31:27 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7330


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |bugzilla at digitalmars.com


--- Comment #5 from Peter Alexander <peter.alexander.au at gmail.com> 2012-01-21 03:51:22 PST ---
(In reply to comment #3)
> I'm not quite sure how the language spec would be updated though. I don't know
> how you could have interpreted it to mean that you could put them after the
> line where you used what you're importing within a function. I would have
> thought that it was crystal clear as it is.

Well, it can't be crystal clear because you were unaware that you could put
imports at module scope after the use of the imported symbols :-)

One way would be to add a statement to the effect of:

"At module scope, import declarations may appear after the use of imported
symbols. However, in local scopes, import declarations must appear before the
use of any symbols introduced by the import."

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list