File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
test/src/summary/elements Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -490,9 +490,6 @@ class ClassElementImpl extends ClassOrMixinElementImpl
490490 return ;
491491 }
492492
493- // Assign to break a possible infinite recursion during computing.
494- _constructors = const < ConstructorElementImpl > [];
495-
496493 var superType = supertype;
497494 if (superType == null ) {
498495 // Shouldn't ever happen, since the only classes with no supertype are
@@ -503,6 +500,9 @@ class ClassElementImpl extends ClassOrMixinElementImpl
503500 return ;
504501 }
505502
503+ // Assign to break a possible infinite recursion during computing.
504+ _constructors = const < ConstructorElementImpl > [];
505+
506506 var superElement = superType.element as ClassElementImpl ;
507507
508508 var constructorsToForward = superElement.constructors
Original file line number Diff line number Diff line change @@ -26355,6 +26355,18 @@ library
2635526355''');
2635626356 }
2635726357
26358+ test_classAlias_constructors_beforeOtherProperties() async {
26359+ // https://github.com/dart-lang/sdk/issues/57035
26360+ var library = await buildLibrary('''
26361+ abstract mixin class A {}
26362+ mixin M {}
26363+ class X = A with M;
26364+ ''');
26365+
26366+ var X = library.getClass('X')!;
26367+ expect(X.constructors, hasLength(1));
26368+ }
26369+
2635826370 test_classAlias_constructors_default() async {
2635926371 var library = await buildLibrary('''
2636026372class A {}
You can’t perform that action at this time.
0 commit comments