Skip to content

Getters should be marked with isGetter when fetching class definitions with getObject() #2184

@DanTup

Description

@DanTup

dart-lang/sdk#52920 added a new isGetter field to members returned in class definitions via getObject(), but it's not currently populated by DWDS:

{
	"type": "@Function",
	"id": "methods|classes|package:flutter_hello_world/getters.dart|Danny|kind",
	"name": "kind",
	"owner": {
		"type": "@Class",
		"id": "classes|package:flutter_hello_world/getters.dart|Danny",
		"name": "Danny",
		"library": {
			"type": "@Library",
			"id": "package:flutter_hello_world/getters.dart",
			"name": "package:flutter_hello_world/getters.dart",
			"uri": "package:flutter_hello_world/getters.dart"
		}
	},
	"static": false,
	"const": false,
	"implicit": false,
	"abstract": false,
	"isGetter": false, // <-- expected to be true
	"isSetter": false
},

DAP isn't using isGetter yet (it currently checks f.json?['_kind'] == 'GetterFunction which also isn't true here), but I'm going to switch it over to that shortly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions