Skip to content

Regression in array-like map access #1411

@mauromol

Description

@mauromol

With Greclipse 4.8.0.v202210192327-e2206 I see the following regression:

package testmap
import groovy.transform.CompileStatic
@CompileStatic
class Foo {
	Map<String, Integer> map = new HashMap()
}
package testmap
import groovy.transform.CompileStatic
@CompileStatic
class TestMap {
	void foo() {
		def foo = new Foo()
		def a = 'aaa'
		foo.map[a] = 1
	}
}

An error is given on foo.map: Cannot find matching method testmap.Foo#map(). Please check if the declared type is correct and if the method exists..

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions