summaryrefslogtreecommitdiff
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-08-15 05:57:52 +0200
committerRaul Santos <raulsntos@gmail.com>2022-08-25 01:47:40 +0200
commit6468f9b37c9605757593f9da2137da3ef756880e (patch)
tree0c4aec7e965d5f927c1b70bd2c7390ffab2df927 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
parentd0a2a4c98195eb8a43713286b5b865dfbed05163 (diff)
Add MustBeVariant attribute and analyzer
- MustBeVariant attribute can be used to enforce that generic types must be a marshable from/to Variant. - Also renames all diagnostic ids to be valid unicode identifiers.
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
index ca84518c0c..831ac3bdeb 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
@@ -11,11 +11,11 @@ namespace Godot.SourceGenerators
{
public INamedTypeSymbol GodotObjectType { get; }
- public TypeCache(GeneratorExecutionContext context)
+ public TypeCache(Compilation compilation)
{
INamedTypeSymbol GetTypeByMetadataNameOrThrow(string fullyQualifiedMetadataName)
{
- return context.Compilation.GetTypeByMetadataName(fullyQualifiedMetadataName) ??
+ return compilation.GetTypeByMetadataName(fullyQualifiedMetadataName) ??
throw new InvalidOperationException("Type not found: " + fullyQualifiedMetadataName);
}