[Issue 7724] 'final:' causes error if any variable declarations are placed between it and the end of its scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 23 02:05:06 PDT 2012


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


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
            Summary|'final:' doesn't work       |'final:' causes error if
                   |                            |any variable declarations
                   |                            |are placed between it and
                   |                            |the end of its scope


--- Comment #14 from Stewart Gordon <smjg at iname.com> 2012-04-23 02:05:59 PDT ---
(In reply to comment #13)
> I think it depends how you look at it.  The colon syntax isn't 
> really an explicit application of an attribute to everything that 
> follows (at least, it doesn't seem to be that way for all other 
> attributes at this time).

That's indeed the point I was making in comment 5.

> The policy already seems to be be defined as applying the attribute 
> only those items it is applicable to, the only exclusion at this 
> time seems to be final.

But it's generally doing this with all ways of applying an attribute, not just
the colon syntax.

>>> It's clearly a bug.  All other attributes work as expected.
>> 
>> Not sure what you mean by that....
> 
> '__gshared:' doesn't cause errors, neither does 'immutable:', or 
> any others I tried.  They all have cases where they are not 
> applicable, but they are silently ignored, as final should be.

So in your mind, if the compiler just ignored an ExpressionStatement that is a
call to an undefined function (skipped over it without generating any code),
this would constitute the call working? :)

-- 
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