There's no shadowing in the latter case. The second case is the same thing as
a := 2
a = 3
By definition you must have nested scopes to have shadowing. Within the same scope, it's only ever assignment.