aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-14 17:39:03 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-14 17:39:03 +0100
commit0d2fd0fd49fb1b6d4ab344ae32da493b36c99ba7 (patch)
tree25b4879b846ede6513331f9c1bbd5c480f37c833 /src
parent016a60cda879f9c326d3f732fe33ec070f998999 (diff)
downloaddotty-0d2fd0fd49fb1b6d4ab344ae32da493b36c99ba7.tar.gz
dotty-0d2fd0fd49fb1b6d4ab344ae32da493b36c99ba7.tar.bz2
dotty-0d2fd0fd49fb1b6d4ab344ae32da493b36c99ba7.zip
Defining standard dotty classes used in Definitions.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/Pair.scala5
-rw-r--r--src/dotty/Singleton.scala5
-rw-r--r--src/dotty/annotation/internal/Alias.scala7
-rw-r--r--src/dotty/annotation/internal/AnnotationDefault.scala7
-rw-r--r--src/dotty/annotation/internal/Child.scala7
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala2
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala5
7 files changed, 34 insertions, 4 deletions
diff --git a/src/dotty/Pair.scala b/src/dotty/Pair.scala
new file mode 100644
index 000000000..73696b69c
--- /dev/null
+++ b/src/dotty/Pair.scala
@@ -0,0 +1,5 @@
+package dotty
+
+class Pair[T, U](x: T, y: U) {
+
+} \ No newline at end of file
diff --git a/src/dotty/Singleton.scala b/src/dotty/Singleton.scala
new file mode 100644
index 000000000..06f975b01
--- /dev/null
+++ b/src/dotty/Singleton.scala
@@ -0,0 +1,5 @@
+package dotty
+
+class Singleton {
+
+} \ No newline at end of file
diff --git a/src/dotty/annotation/internal/Alias.scala b/src/dotty/annotation/internal/Alias.scala
new file mode 100644
index 000000000..44695c7dd
--- /dev/null
+++ b/src/dotty/annotation/internal/Alias.scala
@@ -0,0 +1,7 @@
+package dotty.annotation.internal
+
+import scala.annotation.Annotation
+
+class Alias(aliased: Any) extends Annotation {
+
+} \ No newline at end of file
diff --git a/src/dotty/annotation/internal/AnnotationDefault.scala b/src/dotty/annotation/internal/AnnotationDefault.scala
new file mode 100644
index 000000000..1405c94bd
--- /dev/null
+++ b/src/dotty/annotation/internal/AnnotationDefault.scala
@@ -0,0 +1,7 @@
+package dotty.annotation.internal
+
+import scala.annotation.Annotation
+
+class AnnotationDefault extends Annotation {
+
+} \ No newline at end of file
diff --git a/src/dotty/annotation/internal/Child.scala b/src/dotty/annotation/internal/Child.scala
new file mode 100644
index 000000000..9c2f83d7b
--- /dev/null
+++ b/src/dotty/annotation/internal/Child.scala
@@ -0,0 +1,7 @@
+package dotty.annotation.internal
+
+import scala.annotation.Annotation
+
+class Child[T] extends Annotation {
+
+} \ No newline at end of file
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index acd5258b9..1a07443ea 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -57,7 +57,7 @@ object Annotations {
apply(defn.AliasAnnot, List(Ident(TermRef(sym.owner.thisType, sym.name, sym.signature))))
def makeChild(sym: Symbol)(implicit ctx: Context) =
- apply(defn.ChildAnnot, List(Ident(NamedType(sym.owner.thisType, sym.name))))
+ apply(defn.ChildAnnot.typeConstructor.appliedTo(NamedType(sym.owner.thisType, sym.name)), Nil)
}
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) =
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index 65c46c701..4ddf2e49a 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -135,11 +135,11 @@ class Definitions(implicit ctx: Context) {
// Annotation classes
lazy val AliasAnnot = requiredClass("dotty.annotation.internal.Alias")
- lazy val ChildAnnot = requiredClass("dotty.annotation.internal.Alias")
+ lazy val ChildAnnot = requiredClass("dotty.annotation.internal.Child")
lazy val ScalaSignatureAnnot = requiredClass("scala.reflect.ScalaSignature")
lazy val ScalaLongSignatureAnnot = requiredClass("scala.reflect.ScalaLongSignature")
lazy val DeprecatedAnnot = requiredClass("scala.deprecated")
- lazy val AnnotationDefaultAnnot = requiredClass("dotty.runtime.AnnotationDefault")
+ lazy val AnnotationDefaultAnnot = requiredClass("dotty.annotation.internal.AnnotationDefault")
lazy val ThrowsAnnot = requiredClass("scala.throws")
// Derived types
@@ -238,7 +238,6 @@ class Definitions(implicit ctx: Context) {
/** Lists core classes that don't have underlying bytecode, but are synthesized on-the-fly in every reflection universe */
lazy val syntheticCoreClasses = List(
AnyRefAlias,
- SingletonClass,
RepeatedParamClass,
JavaRepeatedParamClass,
ByNameParamClass,