www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1912] New: (Another) Error message without a line number

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

           Summary: (Another) Error message without a line number
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: webmaster villagersonline.com


The code below actually has two problems with the error messages produced.

This bug is to report the fact that the first error message does not have a
line number or file listed.

dmd 2.012, Linux

BEGIN MODULE "a.d"
  import b;

  import std.stdio;

  template typeof_each(T,TPL...)
  {
    static if(TPL.length == 0)
      alias Tuple!(typeof(T)) typeof_each;
    else
      alias Tuple!(typeof(T), typeof_each!(TPL)) typeof_each;
  }

  template typeid_each(T,TPL...)
  {
    static if(TPL.length == 0)
      alias Tuple!(typeid(T)) typeid_each;
    else
      alias Tuple!(typeid(T), typeid_each!(TPL)) typeid_each;
  }

  void foo(ARGS_TPL...)(ARGS_TPL args)
  {
    writefln("", typeid_each!(typeof_each!(ARGS_TPL)));
  }

  void bar()
  {
    foo(',' , ',');
  }

BEGIN MODULE "b.d"
  template Tuple(TPL...)
  {
    alias TPL Tuple;
  }

END CODE

COMPILER OUTPUT
  Error: expression & _D10TypeInfo_a6__initZ is not a valid template value
argument
  b.d(16): template instance b.Tuple!(& _D10TypeInfo_a6__initZ) error
instantiating


-- 
Mar 12 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1912


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|(Another) Error message     |Error without line number
                   |without a line number       |(Tuple, invalid value
                   |                            |argument)




------- Comment #1 from clugdbug yahoo.com.au  2008-06-19 13:47 -------
Reduced test case. Changed title.
---
template Tuple(T...) {
    alias T Tuple;
}

auto K = Tuple!(typeid(char));
---

Error: expression & D10TypeInfo_a6__initZ is not a valid template value
argument
a.d(7): template instance a.Tuple!(& D10TypeInfo_a6__initZ) error instantiating


-- 
Jun 19 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1912


clugdbug yahoo.com.au changed:

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




------- Comment #2 from clugdbug yahoo.com.au  2008-07-09 07:14 -------
Fixed DMD1.032


-- 
Jul 09 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1912





------- Comment #3 from webmaster villagersonline.com  2008-07-09 14:28 -------
In my example code, the two original errors have gone away.  There is a new
error present, but it has a line number.  I have not yet determined whether the
new error is a problem in dmd or in my code.  If it turns out to be DMD, I will
open a new Bugzilla.

So, I agree that this bug is fixed.


-- 
Jul 09 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1912





------- Comment #4 from bugzilla digitalmars.com  2008-07-09 22:41 -------
Fixed dmd 1.032 and 2.016


-- 
Jul 09 2008