@@ -315,7 +315,9 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
315
315
int_value,
316
316
..
317
317
} => {
318
- if self . environment . target == Target :: JavaScript {
318
+ if self . environment . target == Target :: JavaScript
319
+ && !self . implementations . uses_javascript_externals
320
+ {
319
321
check_javascript_int_safety ( & int_value, location, self . problems ) ;
320
322
}
321
323
@@ -1309,8 +1311,12 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
1309
1311
1310
1312
// Ensure the pattern matches the type of the value
1311
1313
let pattern_location = pattern. location ( ) ;
1312
- let mut pattern_typer =
1313
- pattern:: PatternTyper :: new ( self . environment , & self . hydrator , self . problems ) ;
1314
+ let mut pattern_typer = pattern:: PatternTyper :: new (
1315
+ self . environment ,
1316
+ & self . implementations ,
1317
+ & self . hydrator ,
1318
+ self . problems ,
1319
+ ) ;
1314
1320
let unify_result = pattern_typer. unify ( pattern, value_typ. clone ( ) , None ) ;
1315
1321
1316
1322
let minimum_required_version = pattern_typer. minimum_required_version ;
@@ -1533,8 +1539,12 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
1533
1539
subjects : & [ TypedExpr ] ,
1534
1540
location : & SrcSpan ,
1535
1541
) -> Result < ( TypedMultiPattern , Vec < TypedMultiPattern > ) , Error > {
1536
- let mut pattern_typer =
1537
- pattern:: PatternTyper :: new ( self . environment , & self . hydrator , self . problems ) ;
1542
+ let mut pattern_typer = pattern:: PatternTyper :: new (
1543
+ self . environment ,
1544
+ & self . implementations ,
1545
+ & self . hydrator ,
1546
+ self . problems ,
1547
+ ) ;
1538
1548
let typed_pattern = pattern_typer. infer_multi_pattern ( pattern, subjects, location) ?;
1539
1549
1540
1550
// Each case clause has one or more patterns that may match the
0 commit comments