[Assign plugin] Add a compiler plugin for overloading assign ('=') operator

This commit is contained in:
Anže Sodja
2022-09-01 07:51:38 +02:00
committed by Dmitriy Novozhilov
parent 6052962f50
commit 09d6dfc8bf
62 changed files with 2822 additions and 6 deletions
@@ -0,0 +1,19 @@
/incorrectUsage.kt:18:5: error: val cannot be reassigned
task.input = 42
^
/incorrectUsage.kt:18:16: error: no applicable 'assign' function found for '=' overload
task.input = 42
^
/incorrectUsage.kt:18:18: error: the integer literal does not conform to the expected type StringProperty
task.input = 42
^
/incorrectUsage.kt:24:9: error: val cannot be reassigned
input = 42
^
/incorrectUsage.kt:24:15: error: no applicable 'assign' function found for '=' overload
input = 42
^
/incorrectUsage.kt:24:17: error: the integer literal does not conform to the expected type StringProperty
input = 42
^