Skip to content

Generate static interface fields when DIM is enabled #821

@jpobst

Description

@jpobst

Context: dotnet/android#5818
Context: #459
Context: #509

When we began generating static methods and properties on interfaces when running with DIM enabled, it looks like we did not include static fields that cannot be treated as constants.

Thus, given the following example from dotnet/android#5818:

public interface EGL10 {
  public static final int EGL_ALPHA_FORMAT = 12424;
  public static final EGLSurface EGL_NO_SURFACE;
}

we only generate:

public partial interface IEGL10 {
  public const int EglAlphaFormat = (int) 12424;
}

This is an issue because we [Obsolete]'d the version in the *class* EGL10 pointing to the non-existent interface version:

[Obsolete ("Use 'Javax.Microedition.Khronos.Egl.IEGL10.EglNoSurface'. This class will be removed in a future release.")]
public static Javax.Microedition.Khronos.Egl.EGLSurface? EglNoSurface {
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions