diff --git a/mainargs/src/Macros.scala b/mainargs/src/Macros.scala index d6d3754..4db75a0 100755 --- a/mainargs/src/Macros.scala +++ b/mainargs/src/Macros.scala @@ -146,7 +146,7 @@ class Macros(val c: Context) { _root_.mainargs.MainData.create[$returnType, $curCls]( $methodName, $mainInstance, - Seq(..$argSigs), + _root_.scala.Seq(..$argSigs), ($baseArgSym: $curCls, $argListSymbol: _root_.scala.Seq[_root_.scala.Any]) => { $baseArgSym.${TermName(methodName)}(..$argNameCasts) } diff --git a/mainargs/test/src/HygieneTests.scala b/mainargs/test/src/HygieneTests.scala new file mode 100644 index 0000000..626eba1 --- /dev/null +++ b/mainargs/test/src/HygieneTests.scala @@ -0,0 +1,26 @@ +package mainargs +import utest._ + + +object HygieneTests extends TestSuite{ + + object Main{ + @main + def run(@arg(short = 'f', doc = "String to print repeatedly") + foo: String, + @arg(name = "my-num", doc = "How many times to print string") + myNum: Int = 2, + @arg(doc = "Example flag") + bool: Flag) = { + foo * myNum + " " + bool.value + } + } + + val tests = Tests { + import scala.collection.mutable._ + test("importingSeqShouldntFailCompile"){ + ParserForMethods(Main) + } + + } +}