D_Parser icon indicating copy to clipboard operation
D_Parser copied to clipboard

Failure to parse protected inner struct of class Logger in std.experimental.core

Open mleise opened this issue 10 years ago • 3 comments

Auto-complete doesn't show any fields of payload in this code:

import std.experimental.logger;

class FunkyLogger : Logger
{
    this(LogLevel lv)
    {
        super(lv);
    }

    override void writeLogMsg(ref LogEntry payload)
    {
        payload.|
    }
}

mleise avatar Sep 08 '14 17:09 mleise

This is because LogEntry is marked as protected. Removing the 'protected' attribute will show payload's items properly. Anyway..I hope this won't introduce too many new states.

aBothe avatar Sep 08 '14 19:09 aBothe

Your first sentence sounds like "this is a bug in Logger, it uses the wrong protection attribute" and your second sentence sounds like "this sucks, but I'm going to fix it". I take it your 2nd sentence overrides the first one.

mleise avatar Sep 08 '14 23:09 mleise

Nah, this only was a note to myself and how to fix it

aBothe avatar Sep 08 '14 23:09 aBothe