Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Lookup symbol" leads to incorrect class for subclasses #73792

Open
Kelin2025 opened this issue Feb 23, 2023 · 0 comments
Open

"Lookup symbol" leads to incorrect class for subclasses #73792

Kelin2025 opened this issue Feb 23, 2023 · 0 comments

Comments

@Kelin2025
Copy link

Godot version

4.0.rc2

System information

Win 10

Issue description

I created a class with utility presets

class_name ActionPreset

class Type:
  static func Projectile(config):
    # Code here

And use it in my skills:

extends ActionV2

func setup_contexts():
  return DDeclaration.new([
    ActionPreset.Type.Projectile({
      # config
    })
  ])

However, I also have a global Projectile class which is declared via class_name Projectile
And, if you cmd+click on Projectile to lookup, it will open Projectile class code instead of ActionPreset.Type.Projectile

Steps to reproduce

Create 3 files

  1. Preset
class_name ActionPreset

class Type:
  static func Projectile(config):
    pass
  1. Projectile
class_name Projectile

func _ready():
  pass
  1. Action
func setup_contexts():
  ActionPreset.Type.Projectile({})
])

And cmd+click on Projectile in the 3rd one

Minimal reproduction project

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

No branches or pull requests

3 participants