File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1297,7 +1297,7 @@ let rec norm : cfg -> env -> stack -> term -> term =
12971297 let t1 = norm cfg env [] t1 in
12981298 log cfg ( fun () -> BU. print_string " +++ Normalizing ascription \n " );
12991299 let asc = norm_ascription cfg env asc in
1300- rebuild cfg env stack ( mk ( Tm_ascribed { tm = U. unascribe t1 ; asc ; eff_opt = l }) t .pos)
1300+ rebuild cfg env stack ( mk ( Tm_ascribed { tm = t1 ; asc ; eff_opt = l }) t .pos)
13011301 )
13021302
13031303 | Tm_match { scrutinee = head ; ret_opt = asc_opt ; brs = branches ; rc_opt = lopt } ->
Original file line number Diff line number Diff line change 1+ module Bug2452
2+
3+ [ @@expect_failure ]
4+ let f () : int = (- 1 ) <: nat
5+
6+ [ @@expect_failure ]
7+ let f x : bool = true <: ( b :bool{ false })
8+
9+ [ @@expect_failure ]
10+ let g ( x : bool) : bool = x <: ( b :bool{ false })
11+
12+ (* This works, h is just inferred to have a refined type. *)
13+ let h x : bool = x <: ( b :bool{ false })
14+
15+ [ @@expect_failure ]
16+ let q = f true
17+
18+ [ @@expect_failure ]
19+ let z : bool = true <: ( b :bool{ false })
You can’t perform that action at this time.
0 commit comments