summaryrefslogtreecommitdiff
path: root/sources/scalac
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-03-15 16:50:07 +0000
committerpaltherr <paltherr@epfl.ch>2004-03-15 16:50:07 +0000
commitff313793ab1564bedbefec853160083d8a0c351f (patch)
treeeca79bbe031e32850627cd647e8bef83fe4e9923 /sources/scalac
parentd58b852b5c3a4394221f3c1700ba1c60a788c7c3 (diff)
downloadscala-ff313793ab1564bedbefec853160083d8a0c351f.tar.gz
scala-ff313793ab1564bedbefec853160083d8a0c351f.tar.bz2
scala-ff313793ab1564bedbefec853160083d8a0c351f.zip
- Added methods Symbol.newVParam
Diffstat (limited to 'sources/scalac')
-rw-r--r--sources/scalac/symtab/Symbol.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java
index 190c467ece..ac96e871ce 100644
--- a/sources/scalac/symtab/Symbol.java
+++ b/sources/scalac/symtab/Symbol.java
@@ -105,6 +105,22 @@ public abstract class Symbol implements Modifiers, Kinds {
return new TermSymbol(pos, name, this, 0, IS_LABEL);
}
+ /** Creates a new value parameter owned by this symbol. */
+ public final TermSymbol newVParam(int pos, int flags, Name name) {
+ assert isTerm(): Debug.show(this);
+ return newTerm(pos, flags | PARAM, name);
+ }
+
+ /**
+ * Creates a new value parameter owned by this symbol and
+ * initializes it with the type.
+ */
+ public final TermSymbol newVParam(int pos, int flags, Name name,Type type){
+ TermSymbol tparam = newVParam(pos, flags, name);
+ tparam.setInfo(type);
+ return tparam;
+ }
+
/**
* Creates a new initialized dummy symbol for template of this
* class.