Closed heinermann closed 8 years ago
i.e. in Scala:
def buildSupplyWith(unit: BWUnit) = { val supplyProvider = unit.getRace.getSupplyProvider unit.getRace match { case Race.Zerg => unit.train(supplyProvider) case _ => unit.build(supplyProvider, game.getBuildLocation(supplyProvider, unit.getTilePosition)) } }
I get the error
Error:(27, 15) stable identifier required, but bwapi.Race.Zerg found. case Race.Zerg => unit.train(unitType) ^
In addition, the following compiles just fine, when it shouldn't:
Race.Zerg = null
Thanks, for the information, these types all will become final in the next release.
i.e. in Scala:
I get the error
In addition, the following compiles just fine, when it shouldn't: