-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add Vtype-def-position option, guarded by a test suite * add filterConfigurations to dependencyUpdates, as suggested in this thread: ben-manes/gradle-versions-plugin#816 upgrade a gradle plugin
- Loading branch information
Showing
8 changed files
with
148 additions
and
32 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
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
20 changes: 20 additions & 0 deletions
20
core/src/test/resources/splain/plugin/VTypeDefPositionSpec/__direct/check
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,20 @@ | ||
newSource1.scala:12: error: implicit error; | ||
!I e: Diff.e1.VV =:= String | ||
Cannot prove that Diff.e1.VV =:= String. | ||
|
||
implicitly[e1.VV =:= String] | ||
^ | ||
newSource1.scala:13: error: type mismatch; | ||
String|Diff.e1.VV | ||
val x: e1.VV = ??? : String | ||
^ | ||
newSource1.scala:12: error: implicit error; | ||
!I e: Diff.e1.VV (defined at) { newSource1.scala:9:10 } =:= String | ||
Cannot prove that Diff.e1.VV =:= String. | ||
|
||
implicitly[e1.VV =:= String] | ||
^ | ||
newSource1.scala:13: error: type mismatch; | ||
String|Diff.e1.VV (defined at) { newSource1.scala:9:10 } | ||
val x: e1.VV = ??? : String | ||
^ |
31 changes: 31 additions & 0 deletions
31
core/src/test/scala/splain/plugin/VTypeDefPositionSpec.scala
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,31 @@ | ||
package splain.plugin | ||
|
||
import splain.SpecBase | ||
|
||
class VTypeDefPositionSpec extends SpecBase.Direct { | ||
|
||
final val diff = | ||
""" | ||
object Diff { | ||
class Example { | ||
type VV | ||
} | ||
val e1 = new Example { | ||
type VV <: Int | ||
} | ||
implicitly[e1.VV =:= String] | ||
val x: e1.VV = ??? : String | ||
} | ||
""" | ||
|
||
describe("#44") { | ||
|
||
check(diff, numberOfErrors = 2) | ||
|
||
check(diff, profile = "-P:splain:Vtype-def-position", numberOfErrors = 2) | ||
} | ||
} |
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