Unity 4.0 warning about "The class defined in script file name 'X' does not match the file name!" when using namespaces

When I added namespaces to my Unity 4.0 scripts this warning started appearing for some of them.

This problem is caused by the use of optional parameters. For example the following method will cause this warning to appear when used inside a class in a namespace:

public string TestMethod(string test = null) {
    return test;
}

A way to work around this would be to just separate the method into multiple overloads:

public string TestMethod(string test) {
    return test;
}

public string TestMethod() {
    return TestMethod(null);
}

I have submitted this issue as a bug to Unity Support.

Seems like it can also happen when using named arguments in C#.

i.e. SomeFunction(Argument1: x, Argument2: y);