exigow / intellij-gdscript

Godot Engine and GDScript support plugin for IntelliJ based IDEs
MIT License
149 stars 10 forks source link

Parser does accept dot in type #108

Closed StefanLobbenmeier closed 2 years ago

StefanLobbenmeier commented 2 years ago

I get this error

')', ',', ':=', '=', LINE_BREAK or '[' expected, got '.'

This should be enough code to reproduce:

A.gd

class SubA:

B.gd

var A = preload("A.gd")

func a(par: A.SubA) ->  A.SubA:

Screenshot: image

Another screenshot after removing .SubA from the parameter: image

StefanLobbenmeier commented 2 years ago

Also loaded them in godot and fixed them to be accepted by godot linter:

A.gd

class SubA:
    func init():
        print("")

B.gd

const A = preload("A.gd")

func a(par: A.SubA) ->  A.SubA:
    return A.SubA.new()

Error is still the same though: image

No error in Godot: image

exigow commented 2 years ago

Thanks @StefanLobbenmeier for description. Fix is included in latest version (0.34.6).