File tree 2 files changed +25
-4
lines changed
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : build
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ go-versions : [ '1.18', '1.22' ]
15
+ go-arch : [ '386' ]
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - name : Setup Go ${{ matrix.go-version }}
19
+ uses : actions/setup-go@v4
20
+ with :
21
+ go-version : ${{ matrix.go-version }}
22
+ - name : Build
23
+ run : GOARCH=${{ matrix.go-arch }} go build
Original file line number Diff line number Diff line change @@ -345,9 +345,7 @@ func (c *compiler) IntegerNode(node *ast.IntegerNode) {
345
345
}
346
346
c .emitPush (int32 (node .Value ))
347
347
case reflect .Int64 :
348
- if node .Value > math .MaxInt64 || node .Value < math .MinInt64 {
349
- panic (fmt .Sprintf ("constant %d overflows int64" , node .Value ))
350
- }
348
+ panic (fmt .Sprintf ("constant %d overflows int64" , node .Value ))
351
349
c .emitPush (int64 (node .Value ))
352
350
case reflect .Uint :
353
351
if node .Value < 0 {
@@ -365,7 +363,7 @@ func (c *compiler) IntegerNode(node *ast.IntegerNode) {
365
363
}
366
364
c .emitPush (uint16 (node .Value ))
367
365
case reflect .Uint32 :
368
- if node .Value > math . MaxUint32 || node . Value < 0 {
366
+ if node .Value < 0 {
369
367
panic (fmt .Sprintf ("constant %d overflows uint32" , node .Value ))
370
368
}
371
369
c .emitPush (uint32 (node .Value ))
You can’t perform that action at this time.
0 commit comments