aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Checking.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-30 20:22:41 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-09 09:40:53 +0100
commit322bcfef33834eb1e57c874c5a745faf65e1b8bc (patch)
treeee7bfd6f07b778da90abe97d84edf955d355d509 /src/dotty/tools/dotc/typer/Checking.scala
parent7ccd02c2cd23e4187f3e3a378973704cecd6459a (diff)
downloaddotty-322bcfef33834eb1e57c874c5a745faf65e1b8bc.tar.gz
dotty-322bcfef33834eb1e57c874c5a745faf65e1b8bc.tar.bz2
dotty-322bcfef33834eb1e57c874c5a745faf65e1b8bc.zip
Move realizability logic from Types to TypeOps.
Types is already big enough.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Checking.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala
index 3a55352fd..d333efa33 100644
--- a/src/dotty/tools/dotc/typer/Checking.scala
+++ b/src/dotty/tools/dotc/typer/Checking.scala
@@ -324,8 +324,8 @@ trait Checking {
/** Check that type `tp` is realizable. */
def checkRealizable(tp: Type, pos: Position)(implicit ctx: Context): Unit = {
- val rstatus = tp.realizability
- if (rstatus ne Realizable) {
+ val rstatus = ctx.realizability(tp)
+ if (rstatus ne TypeOps.Realizable) {
def msg = d"$tp is not a legal path since it ${rstatus.msg}"
if (ctx.scala2Mode) ctx.migrationWarning(msg, pos) else ctx.error(msg, pos)
}