How can we help you today? How can we help you today?

Analyze does not work for fields in generic classes

Hello,

I've found a bug. Try to compile a library with the following code :
public class Class1 {
        public string GetString() {
            return "blah";
        }
    }
    public class Class2<T> {
        private Class1 v;

        public Class2(Class1 v) {
            this.v = v;
        }

        public string GetString {
            get {
                return v.GetString();
            }
        }
    }

Then analyze the variable "v" with reflector. "Used By" reports no use of the variable even if it's used by the property Class2.GetString().

If you remove the Class1 <T> generic parameter, analysis of the same field is correct.

I've tried this with Reflector v. 5.1.5.0

Luc
lucmoco
0

Add comment

Please sign in to leave a comment.