+
Skip to content

GObject-2.0.Integration fails for classes in global namespace #1183

@medovina

Description

@medovina

If a class annotated with "[Subclass<GObject.Object>]" is in the global namespace, then the GObject-2.0.Integration source generator fails. The generated .cs source file fails to compile, with an error like this:

GObject-2.0.Integration/GObject.Integration.SourceGenerator.Generator/ItemData.Subclass.g.cs(1,11): error CS1001: Identifier expected

That's because the generated .cs file begins with this, which is not valid C#:

namespace <global namespace>;

To see this problem, edit the GridView sample by removing the line "namespace GridViewSample;" from CustomObjectGridViewWindow.cs and StringListGridViewWindow.cs, then try to build it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载