1// compile 2 3// Copyright 2013 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7// Issue 6131: missing typecheck after reducing 8// n%1 == 0 to a constant value. 9 10package main 11 12func isGood(n int) bool { 13 return n%1 == 0 14} 15 16func main() { 17 if !isGood(256) { 18 panic("!isGood") 19 } 20} 21