@@ -44,9 +44,22 @@ class ConstConstructorAssert {
4444 // ^
4545 // [analyzer] unspecified
4646 // [cfe] unspecified
47+
48+ const ConstConstructorAssert .oneMixin (IntegerMixin integer)
49+ : assert (.mixinConstOne == integer);
50+ // ^
51+ // [analyzer] unspecified
52+ // [cfe] unspecified
53+
54+ const ConstConstructorAssert .notOneMixin (IntegerMixin integer)
55+ : assert (.mixinConstOne != integer);
56+ // ^
57+ // [analyzer] unspecified
58+ // [cfe] unspecified
4759}
4860
49- void notSymmetrical (Color color, Integer integer, IntegerExt integerExt) {
61+ void notSymmetrical (Color color, Integer integer, IntegerExt integerExt,
62+ IntegerMixin integerMixin) {
5063 const bool symBlueEq = .blue == color;
5164 // ^
5265 // [analyzer] unspecified
@@ -106,9 +119,20 @@ void notSymmetrical(Color color, Integer integer, IntegerExt integerExt) {
106119 // ^
107120 // [analyzer] unspecified
108121 // [cfe] unspecified
122+
123+ if (.mixinOne == integerMixin) print ('not ok' );
124+ // ^
125+ // [analyzer] unspecified
126+ // [cfe] unspecified
127+
128+ if (.mixinOne != integerMixin) print ('not ok' );
129+ // ^
130+ // [analyzer] unspecified
131+ // [cfe] unspecified
109132}
110133
111- void rhsNeedsToBeShorthand (Color color, Integer integer, IntegerExt integerExt, bool condition) {
134+ void rhsNeedsToBeShorthand (Color color, Integer integer, IntegerExt integerExt,
135+ IntegerMixin integerMixin, bool condition) {
112136 const Color constColor = Color .red;
113137 const Object obj = true ;
114138 const bool constCondition = obj as bool ;
@@ -224,9 +248,49 @@ void rhsNeedsToBeShorthand(Color color, Integer integer, IntegerExt integerExt,
224248 // [cfe] unspecified
225249 print ('not ok' );
226250 }
251+
252+ const IntegerMixin constIntegerMixin = IntegerMixin .mixinConstOne;
253+ const bool rhsIntegerMixinEq = constIntegerMixin == (constCondition ? .mixinConstOne : .mixinConstTwo);
254+ // ^
255+ // [analyzer] unspecified
256+ // [cfe] unspecified
257+
258+ const bool rhsIntegerMixinNeq = constIntegerMixin != (constCondition ? .mixinConstOne : .mixinConstTwo);
259+ // ^
260+ // [analyzer] unspecified
261+ // [cfe] unspecified
262+
263+ if (integerMixin == (condition ? .mixinConstOne : .mixinConstTwo)) {
264+ // ^
265+ // [analyzer] unspecified
266+ // [cfe] unspecified
267+ print ('not ok' );
268+ }
269+
270+ if (integerMixin != (condition ? .mixinConstOne : .mixinConstTwo)) {
271+ // ^
272+ // [analyzer] unspecified
273+ // [cfe] unspecified
274+ print ('not ok' );
275+ }
276+
277+ if (integerMixin case == (constCondition ? .mixinConstOne : .mixinConstTwo)) {
278+ // ^
279+ // [analyzer] unspecified
280+ // [cfe] unspecified
281+ print ('not ok' );
282+ }
283+
284+ if (integerMixin case != (constCondition ? .mixinConstOne : .mixinConstTwo)) {
285+ // ^
286+ // [analyzer] unspecified
287+ // [cfe] unspecified
288+ print ('not ok' );
289+ }
227290}
228291
229- void objectContextType (Color color, Integer integer, IntegerExt integerExt) {
292+ void objectContextType (Color color, Integer integer, IntegerExt integerExt,
293+ IntegerMixin integerMixin) {
230294 const Color constColor = Color .red;
231295 const bool contextTypeColorEq = (constColor as Object ) == .blue;
232296 // ^
@@ -319,6 +383,37 @@ void objectContextType(Color color, Integer integer, IntegerExt integerExt) {
319383 // ^
320384 // [analyzer] unspecified
321385 // [cfe] unspecified
386+
387+ const IntegerMixin constIntegerMixin = IntegerMixin .mixinConstOne;
388+ const bool contextTypeIntegerMixinEq = (constIntegerMixin as Object ) == .mixinConstTwo;
389+ // ^
390+ // [analyzer] unspecified
391+ // [cfe] unspecified
392+
393+ const bool contextTypeIntegerMixinNeq = (constIntegerMixin as Object ) != .mixinConstTwo;
394+ // ^
395+ // [analyzer] unspecified
396+ // [cfe] unspecified
397+
398+ if ((integerMixin as Object ) == .mixinOne) print ('not ok' );
399+ // ^
400+ // [analyzer] unspecified
401+ // [cfe] unspecified
402+
403+ if ((integerMixin as Object ) case == .mixinConstOne) print ('not ok' );
404+ // ^
405+ // [analyzer] unspecified
406+ // [cfe] unspecified
407+
408+ if ((integerMixin as Object ) != .mixinOne) print ('not ok' );
409+ // ^
410+ // [analyzer] unspecified
411+ // [cfe] unspecified
412+
413+ if ((integerMixin as Object ) case != .mixinConstOne) print ('not ok' );
414+ // ^
415+ // [analyzer] unspecified
416+ // [cfe] unspecified
322417}
323418
324419void typeParameterContext <C extends Color , T extends Object >(C color, T value) {
@@ -338,11 +433,12 @@ void main() {
338433 Color color = .blue;
339434 Integer integer = .one;
340435 IntegerExt integerExt = .one;
436+ IntegerMixin integerMixin = .mixinOne;
341437
342- notSymmetrical (color, integer, integerExt);
343- rhsNeedsToBeShorthand (color, integer, integerExt, true );
344- rhsNeedsToBeShorthand (color, integer, integerExt, false );
345- objectContextType (color, integer, integerExt);
438+ notSymmetrical (color, integer, integerExt, integerMixin );
439+ rhsNeedsToBeShorthand (color, integer, integerExt, integerMixin, true );
440+ rhsNeedsToBeShorthand (color, integer, integerExt, integerMixin, false );
441+ objectContextType (color, integer, integerExt, integerMixin );
346442
347443 typeParameterContext (color, integer);
348444 typeParameterContext (color, Color .red);
@@ -355,4 +451,6 @@ void main() {
355451 const ConstConstructorAssert .notOne (Integer .constTwo);
356452 const ConstConstructorAssert .oneExt (IntegerExt .constOne);
357453 const ConstConstructorAssert .notOneExt (IntegerExt .constTwo);
454+ const ConstConstructorAssert .oneMixin (IntegerMixin .mixinConstOne);
455+ const ConstConstructorAssert .notOneMixin (IntegerMixin .mixinConstTwo);
358456}
0 commit comments