diff options
author | Martin Odersky <odersky@gmail.com> | 2015-03-04 16:21:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-03-04 16:21:45 +0100 |
commit | b558d6196bb75217acd466bffd59cd4ee339ba27 (patch) | |
tree | 0c79a9828333b53e22715034cccf043b5ff2849a /src/dotty/tools/dotc/core/Definitions.scala | |
parent | 2bdce25034d50bc7526dc1d1c8f57e9c20e45b60 (diff) | |
download | dotty-b558d6196bb75217acd466bffd59cd4ee339ba27.tar.gz dotty-b558d6196bb75217acd466bffd59cd4ee339ba27.tar.bz2 dotty-b558d6196bb75217acd466bffd59cd4ee339ba27.zip |
Eliminate Throw as a typed Tree
Replace with
<compiler-ops>.throw(exception)
Only leave Throw as an untyped tree.
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 67c1f3105..89e4bd371 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -180,6 +180,10 @@ class Definitions { lazy val dummyApply = newPolyMethod( OpsPackageClass, nme.dummyApply, 1, pt => MethodType(List(FunctionType(Nil, PolyParam(pt, 0))), PolyParam(pt, 0))) + + /** Method representing a throw */ + lazy val throwMethod = newMethod(OpsPackageClass, nme.THROWkw, + MethodType(List(ThrowableType), NothingType)) lazy val NothingClass: ClassSymbol = newCompleteClassSymbol( ScalaPackageClass, tpnme.Nothing, AbstractFinal, List(AnyClass.typeRef)) |