Skip to content

Visibility errors when recompiling: "cannot override ... attempting to assign weaker access privileges; was public" #175

@kriegaex

Description

@kriegaex

Lately I am seeing compile errors with my Spock/Geb classes when overriding methods like setup() or cleanup() across three levels of class hierarchy:

cannot override setup() ... attempting to assign weaker access privileges; was public

The errors only occur when doing an incremental recompile, full rebuild works. They go away when I manually recompile the base class.

All methods were defined like this without calling their parent methods because Spock calls each setup method in a defined order anyway:

def setup() { ... }

Environment:

  • IntelliJ IDEA 15.0.4 (commercial version)
  • groovy-eclipse-batch-2.4.3-01.jar as Java & Groovy compiler
  • OpenJDK Runtime Environment (Zulu 8.13.0.5-win64) (build 1.8.0_72-b15)

@aclement: This seems to be similar to apache/grails-core#619, an issue you already know.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions