From eec0e9b2111208c6f0bab8ec5d06c63e4432fb9e Mon Sep 17 00:00:00 2001 From: "Paolo G. Giarrusso" Date: Mon, 7 Nov 2016 20:46:10 +0100 Subject: Resync copy of the type diagram in docs Also add a note that the two diagrams should be kept in sync, both ways, so there's a chance that the copies are kept in sync. Alternatively one could drop a copy. --- docs/docs/internals/type-system.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/docs/internals/type-system.md b/docs/docs/internals/type-system.md index e86e07fd1..e3a563c21 100644 --- a/docs/docs/internals/type-system.md +++ b/docs/docs/internals/type-system.md @@ -13,6 +13,8 @@ A type which inherits `TypeProxy` is a proxy for another type accessible using the `underlying` method, other types are called _ground_ types and inherit `CachedGroundType` or `UncachedGroundType`. +Here's a diagram, copied from [dotty/tools/dotc/core/Types.scala][1]: + ``` Type -+- ProxyType --+- NamedType ----+--- TypeRef | | \ @@ -22,19 +24,22 @@ Type -+- ProxyType --+- NamedType ----+--- TypeRef | | +--- SuperType | | +--- ConstantType | | +--- MethodParam - | | +--- RefinedThis + | | +----RecThis + | | +--- SkolemType | +- PolyParam - | +- RefinedType + | +- RefinedOrRecType -+-- RefinedType + | | -+-- RecType + | +- HKApply | +- TypeBounds | +- ExprType | +- AnnotatedType | +- TypeVar + | +- PolyType | +- GroundType -+- AndType +- OrType +- MethodType -----+- ImplicitMethodType | +- JavaMethodType - +- PolyType +- ClassInfo | +- NoType -- cgit v1.2.3