Skip to content

Commit 2ade08b

Browse files
committed
fix breakages after rebase
1 parent f621f95 commit 2ade08b

File tree

9 files changed

+17
-18
lines changed

9 files changed

+17
-18
lines changed

src/compiler/scala/tools/nsc/tasty/TastyFlags.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ object TastyFlags {
2525
def |(other: TastyFlagSet): TastyFlagSet = TastyFlagSet(flags | other.flags)
2626
def &(mask: TastyFlagSet): TastyFlagSet = TastyFlagSet(flags & mask.flags)
2727
def &~(mask: TastyFlagSet): TastyFlagSet = TastyFlagSet(flags & ~mask.flags)
28-
def unary_! : Boolean = this == EmptyTastyFlags
29-
def is(mask: TastyFlagSet): Boolean = (this & mask).hasFlags
28+
def unary_! : Boolean = this.flags == 0
29+
def is(mask: TastyFlagSet): Boolean = (this & mask) == mask
30+
def isOneOf(mask: TastyFlagSet): Boolean = (this & mask).hasFlags
3031
def is(mask: TastyFlagSet, butNot: TastyFlagSet): Boolean = if (!butNot) is(mask) else is(mask) && not(butNot)
31-
def not(mask: TastyFlagSet): Boolean = !is(mask)
32-
def hasFlags: Boolean = !(!this)
32+
def not(mask: TastyFlagSet): Boolean = !isOneOf(mask)
33+
def hasFlags: Boolean = this.flags != 0
3334
def except(mask: TastyFlagSet): (Boolean, TastyFlagSet) = is(mask) -> (this &~ mask)
3435
}
3536

src/compiler/scala/tools/nsc/tasty/bridge/TastyKernel.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,7 @@ trait TastyKernel { self: TastyUniverse =>
148148
def showRaw(flags: Long): String = symbolTable.showRaw(flags)
149149
def showRaw(any: Product): String = symbolTable.showRaw(any)
150150

151-
def mkTermName(str: String): TermName = {
152-
import symbolTable._
153-
str
154-
}
151+
def mkTermName(str: String): TermName = symbolTable.TermName(str)
155152

156153
type Tree = symbolTable.Tree
157154

src/tastytest/scala/tools/tastytest/TastyTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ object TastyTest {
171171
"-d", out,
172172
"-classpath", classpaths(out, dottyLibrary),
173173
"-deprecation",
174-
"-Xfatal-warnings"
174+
"-Xfatal-warnings",
175+
"-usejavacp"
175176
) ++ sources
176177
Try(nsc.Main.process(args)).getOrElse(false)
177178
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/Users/jamie/workspace/scala/test/tasty/neg-false/src-2/NewJVMEnv_fail.scala:9: error: class type required but tastytest.printing#AnyHash with tastytest.printing#AnyClassName found
22
new Env.JVMEnv {} // error: class type required but tastytest.printing#AnyHash with tastytest.printing#AnyClassName found
33
^
4-
one error found
4+
1 error

test/tasty/neg/src-2/SColourOps.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ It would fail on the following inputs: Blue, CMYK(_, _, _, _), Green, RGB(_, _,
33
def red: Int = c match { // error: non-exhaustive
44
^
55
error: No warnings can be incurred under -Werror.
6-
one warning found
7-
one error found
6+
1 warning
7+
1 error

test/tasty/neg/src-2/SColourOpsUnreachable.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
case SColour.Blue => -1 // error: unreachable
33
^
44
error: No warnings can be incurred under -Werror.
5-
one warning found
6-
one error found
5+
1 warning
6+
1 error

test/tasty/neg/src-2/TestDeprecations.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
def test2 = new Deprecations.Old().completelyUseless() // error: completelyUseless is deprecated: this is useless
66
^
77
error: No warnings can be incurred under -Werror.
8-
two warnings found
9-
one error found
8+
2 warnings
9+
1 error

test/tasty/neg/src-2/TestHello.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ error: Scala 2 incompatible TASTy signature of HelloWorld.tasty in object HelloW
44
required: helloworld.HelloWorld.msg1.type
55
HelloWorld.acceptsOnlyMsg1(helloworld)
66
^
7-
two errors found
7+
2 errors

test/tasty/neg/src-2/TestIntent.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
error: Scala 2 incompatible TASTy signature of Position.tasty in object Position: unsupported Scala 3 flags on method here: inline | <tastymacro>
2-
one error found
2+
1 error

0 commit comments

Comments
 (0)