Skip to content

Instantly share code, notes, and snippets.

@daharon
Created February 18, 2017 19:05
Show Gist options
  • Select an option

  • Save daharon/2798eac049a6e7ffeee45a9f2138e0b2 to your computer and use it in GitHub Desktop.

Select an option

Save daharon/2798eac049a6e7ffeee45a9f2138e0b2 to your computer and use it in GitHub Desktop.
abstract class Var
class Default : Task() {
val vars = object : Var {
var directoryMode = "0750"
}
override val definitions = definition {
directory("Create new directory") {
mode = vars.directoryMode // <- Unresolved reference directoryMode
}
}
}
@daharon
Copy link
Author

daharon commented Feb 18, 2017

The reason for the "Unresolved reference" is because the properties of anonymous classes are always private.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment