Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Mapping of string arrays within an interface #45

Open
ainslec opened this issue Apr 1, 2014 · 3 comments
Open

Mapping of string arrays within an interface #45

ainslec opened this issue Apr 1, 2014 · 3 comments

Comments

@ainslec
Copy link

ainslec commented Apr 1, 2014

In Java, we can have something like this ::

public interface MyInterface {
   public const string[] MY_ARR = new string[] { "one", "two", "three};
}

Sharpen maps this to:

public abstract class MyInterface {
   public const string[] MY_ARR = new string[] { "one", "two", "three};
}

The generated code is not valid. I think this should be mapped to (which is valid) :

public abstract class MyInterface {
   public readonly string[] MY_ARR = { "one", "two", "three};
}

Is there a way around this issue without modifying the codebase? If not, perhaps I can help?

@hazzik
Copy link
Contributor

hazzik commented Apr 1, 2014

Unfortunately you need to change code to fix this.

@Kavignon
Copy link

Has there been any kind of work made around this issue to fix it ? @Takapa @hazzik

@lilith
Copy link
Contributor

lilith commented May 28, 2015

Can we add a failing test for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants