Skip to content

CompileStatic: Spurious errors on equals method shown in eclipse editor and not in Problems #1209

@ssadedin

Description

@ssadedin

I am having a lot of trouble nailing down when this happens and doesn't happen, and unfortunately
so far don't have a simple example I can share.

The problem is always in an equals comparison and occurs on the base language types like Object, String and null - here's an example where it claims it cannot compare two strings:

image

Here's another example where it can't compare something to null:

image

Sorry I don't yet have a reproducible example - it seems to be sporadic enough that I can't yet make a simple example of it. However I wanted to log this in case there's a way to fix it anyway, or if other people are encountering it.

I was encountering this using the stable release of 3.9.0 and now upgraded to the snapshot release of 4.0:

image

Both of them seem to have the same behaviour.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions