This is a migrated thread and some comments may be shown as answers.

bug Method and Base Static Class with same name

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Blamara
Top achievements
Rank 1
Blamara asked on 05 Apr 2015, 11:07 PM

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 07 Apr 2015, 02:57 PM
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
Tags
General Discussions
Asked by
Blamara
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or