type
Coordinate = 1..20
var
test: Coordinate
echo test # prints 0, outside of the bounds of Coordinate
test = 0 # compile Error: conversion from int literal(0)
test = test - 1 # runtime unhandled exception: value out of range -1 [RangeError]
It's a bug, the compiler should produce a "cannot prove 'test' is initialized" warning for this. Please report.
EDIT Sorry, misread, that's not a bug at all. You have to use this syntax:
type
Coordinate = range[1..20]
var
test: Coordinate
echo test