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.