www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12047] New: Regression (2.065 git-head): UDAs are not checked

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12047

           Summary: Regression (2.065 git-head): UDAs are not checked
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-01-31
09:12:37 PST ---
-----
 asdfasdf  // no error??
void foo() { }

void main()
{
}
-----

This compiles without error.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 31 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12047



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-01-31
09:14:30 PST ---
Ok this is even more serious than I thought:

-----
template portable(alias func)
{
    pragma(msg, "We're here");
}

 portable!foo
void foo(...) { }

void main() { }
-----

2.064:
$ dmd test.d
 We're here

2.065 git-head: $ dmd test.d
 

The template is not being instantiated. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 31 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12047


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, pull


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2014-02-01 04:26:51 PST ---
https://github.com/D-Programming-Language/dmd/pull/3183

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 01 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12047



--- Comment #3 from github-bugzilla puremagic.com 2014-02-06 17:13:07 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c2b869fc5ea3984e3c92e0841f3db1c0af2a5c4c
fix Issue 12047 - UDAs are not checked

This is also a refactoring change for UDA semantic analysis.

1. Run UDAs in semantic2 phase.
Currently forward reference resolution mechanism is not perfect. UDAs often
depends on other declarations in user code. Therefore analysing them in
semantic1 phase would easily hit fwdref issues.
On the other hand, if UDAs are not checked for conditional compilation,
essentially they have no effect for final execution code. So, I think moving
their analysis timing from semantic1 to semantic2 is not a problem.

2. Each Dsymbols now have a pointer to the enclosing UserAttributeDeclaration.
We can use UserAttributeDeclaration::scope for forward reference resolution of
UDAs. So we can elide Dsymbol::userAttributesScope.

https://github.com/D-Programming-Language/dmd/commit/f9e3f41f4744079f220e0d64d62bd5e25994ceb2
Merge pull request #3183 from 9rnsr/fix12047

[REG2.065a] Issue 12047 - UDAs are not checked

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 06 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12047


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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