Skip to content

Commit

Permalink
Tests for backticked infix
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Feb 3, 2020
1 parent 8280a58 commit 1b22680
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/files/neg/infixed.check
@@ -0,0 +1,4 @@
infixed.scala:8: error: ';' expected but integer literal found.
x 42
^
one error found
10 changes: 10 additions & 0 deletions test/files/neg/infixed.scala
@@ -0,0 +1,10 @@
// scalac: -Xsource:3

class K { def x(y: Int) = 0 }

class Test {
def bad = {
(new K)
x 42
}
}
10 changes: 10 additions & 0 deletions test/files/pos/infixed.scala
@@ -0,0 +1,10 @@
// scalac: -Xsource:3

class K { def x(y: Int) = 0 }

class Test {
def ok = {
(new K)
`x` 42
}
}

0 comments on commit 1b22680

Please sign in to comment.