diff --git a/shared/src/main/scala/io/kaitai/struct/precompile/TypeValidator.scala b/shared/src/main/scala/io/kaitai/struct/precompile/TypeValidator.scala index d752619c1..01e69f920 100644 --- a/shared/src/main/scala/io/kaitai/struct/precompile/TypeValidator.scala +++ b/shared/src/main/scala/io/kaitai/struct/precompile/TypeValidator.scala @@ -168,7 +168,9 @@ class TypeValidator(specs: ClassSpecs) extends PrecompileStep { } else { None } - val problems2 = validateDataType(caseType, casePath) + // All properties of types is declared on the common level for all variants so + // we don't use `casePath` here + val problems2 = validateDataType(caseType, path) problems1 ++ problems2 } }