1
0
mirror of https://github.com/golang/go synced 2024-11-20 06:24:40 -07:00

gc: Better error when computing remainder of non-int

Previously the compiler would just emit "internal compiler error" when
trying to compute the remainder of floats or complex types.

R=rsc
CC=golang-dev
https://golang.org/cl/1243041
This commit is contained in:
Evan Shaw 2010-05-18 22:41:12 -07:00 committed by Russ Cox
parent 809479740f
commit d2aa74118c

View File

@ -491,7 +491,7 @@ typeinit(void)
okfor[OGT] = okforcmp; okfor[OGT] = okforcmp;
okfor[OLE] = okforcmp; okfor[OLE] = okforcmp;
okfor[OLT] = okforcmp; okfor[OLT] = okforcmp;
okfor[OMOD] = okforarith; okfor[OMOD] = okforand;
okfor[OMUL] = okforarith; okfor[OMUL] = okforarith;
okfor[ONE] = okforeq; okfor[ONE] = okforeq;
okfor[OOR] = okforand; okfor[OOR] = okforand;