Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #447 (closed defect: invalid)

Opened 13 years ago

Last modified 13 years ago

Seemingly random errors on unterminated /++/ comment

Reported by: mrmonday Assigned to: ChristianK
Priority: major Milestone:
Component: unspecified Version: hg tip
Keywords: Cc:

Description

When the following is compiled with

ldmd -unittest -c Sqlite.d

Sqlite.d:

module Sqlite;

import Database;

class SqliteDatabase
{
    public Result!(T) execute(T)()
    {
        assert(0);
    }
}

unittest
{
    auto db = new SqliteDatabase();
    struct Test
    {
    }
    db.execute!(Test)();
}

Database.d:

module Database;

class Result(T)
{
    T[] mResults;
//import tango.util.log.Trace;
import tango.util.log.Log;

    size_t length()
    {
        return mResults.length;
    }
}

Log.d:

module Log;
/+/++/

LDC gives the errors:

Database.d(20): Error: this for mResults needs to be type Result not type Database.Result!(Test).Result
Sqlite.d(28): Error: template instance Sqlite.SqliteDatabase.execute!(Test) error instantiating

When it should give an error about the unterminated doc comment. dmd compiles without error.

Change History

01/01/11 22:07:29 changed by mrmonday

import tango.util.log.Log; <= that line should be import Log; obviously. See also http://d.puremagic.com/issues/show_bug.cgi?id=5398

04/25/11 15:53:43 changed by mwarning

  • status changed from new to closed.
  • resolution set to invalid.

This is not a ldc specific error, but a dmdfe issue. Since it's in the dmd bug tracker, I think we can close this one.

Copyright © 2008, LDC Development Team.