Skip to content

Commit

Permalink
wtf. how can this code ever have worked? Workaround for synthetic wei…
Browse files Browse the repository at this point in the history
…rdness scalac attaches to debug symbols
  • Loading branch information
DRMacIver committed Aug 5, 2009
1 parent 6602f19 commit 670bd75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#Project properties
#Fri May 01 08:21:31 BST 2009
project.organization=empty
#Project Properties
#Wed Aug 05 21:16:17 BST 2009
project.name=optional
project.organization=empty
sbt.version=0.4.5
scala.version=2.7.4
project.version=0.1
5 changes: 3 additions & 2 deletions src/main/scala/application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ trait Application{

for(i <- 0 until methodArguments.length){
val tpe = parameterTypes(i);
def valueOf(x : Option[String]) = x.map(coerceTo(_, tpe)).getOrElse(defaultFor(tpe));
methodArguments(i) = argumentNames(i) match {
def valueOf(x : Option[String]) =
x.map(coerceTo(_, tpe)).getOrElse(defaultFor(tpe));
methodArguments(i) = argumentNames(i).replaceAll("\\$.+", "") match {
case "args" | "arguments" => {
val x = arguments.toArray[String];
x // work around for retarded array boxing
Expand Down

0 comments on commit 670bd75

Please sign in to comment.