diff options
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 6edc5c973..1e3fe4e52 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -235,6 +235,10 @@ trait Symbols { this: Context => def newSkolem(tp: Type) = newSymbol(defn.RootClass, nme.SKOLEM, SyntheticArtifact, tp) + def newErrorSymbol(owner: Symbol, name: Name) = + newSymbol(owner, name, SyntheticArtifact, + if (name.isTypeName) TypeAlias(ErrorType) else ErrorType) + type OwnerMap = Symbol => Symbol /** Map given symbols, subjecting all types to given type map and owner map. diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index ff0f2e990..49ad67c49 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -376,6 +376,8 @@ object Types { l.findMember(name, pre, excluded) & (r.findMember(name, pre, excluded), pre) case OrType(l, r) => l.findMember(name, pre, excluded) | (r.findMember(name, pre, excluded), pre) + case ErrorType => + ctx.newErrorSymbol(pre.classSymbol orElse defn.RootClass, name) case NoType => NoDenotation } /* !!! DEBUG ensuring { denot => |