bug Method and Base Static Class with same name

2 posts, 1 answers
  1. Blamara
    Blamara avatar
    10 posts
    Member since:
    Dec 2014

    Posted 05 Apr 2015 Link to this post

    If you create method with same name as some Base Static Class, and you call base static class from within same class where you have this method.
    JustDecompiler fails to properly decompile. 

    original code:

    class MethodAsBaseClassName
    {
      public bool Convert(object a)
      {
        return (bool)System.Convert.ToBoolean((string)a);
      }
    }

    decompiled code:

    internal class MethodAsBaseClassName
    {
        public MethodAsBaseClassName()
        {
        }
     
        public bool Convert(object a)
        {
            return Convert.ToBoolean((string)a);
        }
    }

    missing namespace classifier, and compiler can't compile code.
    Compiler thinks he should call method MethodAsBaseClassName.Convert instead of System.Convert static class.

  2. Answer
    Alexander
    Admin
    Alexander avatar
    80 posts

    Posted 07 Apr 2015 Link to this post

    Hello Blamara,

    Thank you for letting us know about this problem. I really appreciate it.

    The bug is added to our backlog and will be fixed as soon as possible.

    Please, update regularly and stay tuned.

    Regards,
    Alexander
    Telerik
  3. DevCraft banner
Back to Top