GlobalClass.GD0402.cs 367 B

123456789101112131415
  1. using Godot;
  2. // This works because it inherits from GodotObject and it doesn't have any generic type parameter.
  3. [GlobalClass]
  4. public partial class CustomGlobalClass : GodotObject
  5. {
  6. }
  7. // This raises a GD0402 diagnostic error: global classes can't have any generic type parameter
  8. [GlobalClass]
  9. public partial class {|GD0402:CustomGlobalClass|}<T> : GodotObject
  10. {
  11. }