XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

implementation of interfaces is case sensitive also if project is not case sensitive

Open hpetriffer opened this issue 10 months ago • 1 comments

If a class implements an interface the implementation is also case sensitive

public interface ITest
	public property SymVerkauf as symbol get set
end interface

public class Test implements ITest
	public property symVerkauf as symbol auto get set
end class


function Start() as void strict
	Console.ReadLine()

	return

In this case I get an error " error XS0535: 'Test' does not implement interface member 'ITest.SymVerkauf'"

XSharpTests.zip

hpetriffer avatar Feb 14 '25 15:02 hpetriffer

We have tried to allow this, but the .Net runtime will throw an exception when we do not check that the method in the interface and the method in the class have the same case:

System.TypeLoadException Method 'get_SymVerkauf' in type 'Test' from assembly 'Tester, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

RobertvanderHulst avatar Mar 03 '25 15:03 RobertvanderHulst