diff --git a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/testing/ScriptGen.scala b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/testing/ScriptGen.scala index 5aa425be968..c265a0f6974 100644 --- a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/testing/ScriptGen.scala +++ b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/testing/ScriptGen.scala @@ -1,5 +1,6 @@ package com.wavesplatform.lang.v1.testing +import com.wavesplatform.lang.v1.parser.Parser.keywords import com.wavesplatform.lang.v1.parser.BinaryOperation import com.wavesplatform.lang.v1.parser.BinaryOperation._ import com.wavesplatform.lang.v1.parser.Expressions._ @@ -104,7 +105,7 @@ trait ScriptGen { } yield LET(0, 0, PART.VALID(0, 0, name), value, Seq.empty) def REFgen: Gen[EXPR] = - Gen.identifier.map(PART.VALID[String](0, 0, _)).map(REF(0, 0, _)) + Gen.identifier.filter(!keywords(_)).map(PART.VALID[String](0, 0, _)).map(REF(0, 0, _)) def BLOCKgen(gas: Int): Gen[EXPR] = for {