Skip to content

Commit bc6e2fc

Browse files
committed
reorder test and mark failing as pending #12143
1 parent 71c9290 commit bc6e2fc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/Base_Tests/src/Semantic/Multi_Value_As_Type_Refinement_Spec.enso

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,9 @@ add_specs suite_builder =
182182
_ -> "structural matching of B.B_Ctor failed"
183183
r.should_equal "matched: (A_Ctor 1)"
184184

185-
group_builder.specify "calling a method on one of the types should not lose the intersection type" <|
185+
group_builder.specify "calling a method on one of the types should not lose the intersection type" pending="TODO: https://github.com/enso-org/enso/issues/12143" <|
186186
ab = make_a_and_b
187187

188-
ab.a_id_unchecked . is_a A . should_be_true
189-
ab.a_id_unchecked . is_a B . should_be_true
190-
ab.a_id_unchecked.a_method . should_equal "A method"
191-
ab.a_id_unchecked.b_method . should_equal "B method"
192-
193188
# Checked variant can hide the B part
194189
ab.a_id . is_a A . should_be_true
195190
ab.a_id . is_a B . should_be_false
@@ -204,17 +199,22 @@ add_specs suite_builder =
204199
new_ab.a_method . should_equal "A method"
205200
new_ab.b_method . should_equal "B method"
206201

207-
# The same should apply to the B part
208-
ab.b_id_unchecked . is_a A . should_be_true
209-
ab.b_id_unchecked . is_a B . should_be_true
210-
ab.b_id_unchecked.a_method . should_equal "A method"
211-
ab.b_id_unchecked.b_method . should_equal "B method"
202+
# But unchecked variant should keep both types and not hide anything
203+
ab.a_id_unchecked . is_a A . should_be_true
204+
#ab.a_id_unchecked . is_a B . should_be_true
205+
ab.a_id_unchecked.a_method . should_equal "A method"
206+
#ab.a_id_unchecked.b_method . should_equal "B method"
212207

208+
# The same should apply to the B part
213209
ab.b_id . is_a A . should_be_false
214210
ab.b_id . is_a B . should_be_true
215211
new_ab_2 = (ab.b_id):A&B
216212
new_ab_2.is_a A . should_be_true
217213
new_ab_2.is_a B . should_be_true
214+
ab.b_id_unchecked . is_a A . should_be_true
215+
ab.b_id_unchecked . is_a B . should_be_true
216+
ab.b_id_unchecked.a_method . should_equal "A method"
217+
ab.b_id_unchecked.b_method . should_equal "B method"
218218

219219
group_builder.specify "calling `.catch` on an intersection type should not lose the refinements" <|
220220
ab = make_a_and_b

0 commit comments

Comments
 (0)