diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 82b3b56e9714..a540b6ea54a9 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -562,8 +562,8 @@ class Namer { typer: Typer => * to pick up the context at the point where the completer was created. */ def completeInCreationContext(denot: SymDenotation): Unit = { - denot.info = typeSig(denot.symbol) addAnnotations(denot) + denot.info = typeSig(denot.symbol) Checking.checkWellFormed(denot.symbol) } } @@ -670,6 +670,8 @@ class Namer { typer: Typer => ok } + addAnnotations(denot) + val selfInfo = if (self.isEmpty) NoType else if (cls.is(Module)) { @@ -699,7 +701,6 @@ class Namer { typer: Typer => index(rest)(inClassContext(selfInfo)) denot.info = ClassInfo(cls.owner.thisType, cls, parentRefs, decls, selfInfo) - addAnnotations(denot) Checking.checkWellFormed(cls) if (isDerivedValueClass(cls)) cls.setFlag(Final) cls.setApplicableFlags( diff --git a/src/strawman/collections/CollectionStrawMan4.scala b/src/strawman/collections/CollectionStrawMan4.scala index 874f67a2d86f..ec20849ff1f7 100644 --- a/src/strawman/collections/CollectionStrawMan4.scala +++ b/src/strawman/collections/CollectionStrawMan4.scala @@ -12,6 +12,8 @@ import annotation.tailrec * strengths and weaknesses of different collection architectures. * * For a test file, see tests/run/CollectionTests.scala. + * + * Strawman4 is like strawman1, but built over views instead of by-name iterators */ object CollectionStrawMan4 { diff --git a/src/strawman/collections/CollectionStrawMan5.scala b/src/strawman/collections/CollectionStrawMan5.scala index 1a89d9659c2b..5d04c2c98617 100644 --- a/src/strawman/collections/CollectionStrawMan5.scala +++ b/src/strawman/collections/CollectionStrawMan5.scala @@ -12,6 +12,15 @@ import annotation.tailrec * strengths and weaknesses of different collection architectures. * * For a test file, see tests/run/CollectionTests.scala. + * + * Strawman5 is like strawman4, but using inheritance through ...Like traits + * instead of decorators. + * + * Advantage: Much easier to specialize. See partition for strict (buildable) collections + * or drop for Lists. + * + * Disadvantage: More "weird" types in base traits; some awkwardness with + * @uncheckedVariance. */ object CollectionStrawMan5 {