Thats not a compiler problem its more a parser/lexer problem.
you want to access a field of x (x.ggg) which doesn't exist because x is just an integer and not an object.
const x:int = false
print "Hello"
if x then
Print "X <> False"
endif
This should compile.