Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SI-6091 overeager warning for reference equality
Don't warn on eq and ne unless they're the real eq or ne.
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-Xfatal-warnings -Xlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
object Foo { def eq(x:Int) = x } | ||
|
||
class X { def ==(other: String) = true } | ||
|
||
object Test { | ||
def main(args: Array[String]): Unit = { | ||
Foo eq 1 | ||
new X == null | ||
} | ||
} |