defaultlit(&n->right, types[TUINT]);
if(n->left->type == T || n->right->type == T)
goto ret;
- if(issigned[n->right->type->etype] || !isint[n->right->type->etype])
+ et = n->right->type->etype;
+ if(issigned[et] || !isint[et])
goto badt;
// check of n->left->type happens in second switch.
break;
switch(n->val.ctype) {
case CTINT:
defaultlit(&n, types[TINT64]);
- l->n = n;
break;
case CTFLT:
defaultlit(&n, types[TFLOAT64]);
- l->n = n;
break;
}
}
+ defaultlit(&n, nil);
+ l->n = n;
if(n->type == T)
continue;
--- /dev/null
+// $G $D/$F.go || echo BUG: bug174
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ var x uint;
+ println(1<<x);
+}