Summary: 'this' silently passes from one object to another
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Mariusz GliwiƄski <> 2011-08-29 
03:42:57 PDT ---
import std.stdio;

class T {
    abstract string type() {
        return "T";

class T2 : T {
    override string type() {
        return "T2";
    void test(T)() {

void main() {
    (new T2).test!T();
type() isn't static method so AFAIK it shouldn't be possible to call it from
test(). Instead of that, call is possible, and local 'this' is used.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to