Commit Graph

52 Commits

Author SHA1 Message Date
Svetlana Isakova 68b4b8e946 KT-5182 Data flow info is lost for 'when' branches
#KT-5158 Fixed
  #KT-4332 Fixed
2014-06-06 15:56:02 +04:00
Svetlana Isakova 791fa22abb KT-4405 Control-flow analysis is not performed for some local declarations #KT-4405 Fixed 2014-02-12 12:48:13 +04:00
Svetlana Isakova cc3f450132 added test for obsolete task
#KT-2336 Fixed
2013-12-11 19:53:52 +04:00
Svetlana Isakova 4d39dc38da fixed: smart cast of boolean variable didn't work in boolean expression 2013-12-11 19:53:52 +04:00
Svetlana Isakova cd6934bee8 fixed bug in 'DataFlowInfo.getPossibleTypes'
parent types should be enriched as well
2013-12-11 19:53:51 +04:00
Svetlana Isakova 4a26c9df04 don't report autocast on left expression in equality
if it was checked for not-null beforehand
2013-12-11 19:53:51 +04:00
Svetlana Isakova 4b89c22ba7 Check separately auto casts for nullable types.
It's necessary for functions with generics: constraint system ignores nullability divergence,
the error checks are made afterwards, the auto cast check should be made similarly.
2013-12-11 19:53:51 +04:00
Svetlana Isakova 33c04bde9a changed tests where autocasts aren't needed but are reported
due to KT-4294
2013-12-11 19:53:50 +04:00
Svetlana Isakova c30259dfbe added info about smart casts to diagnostic tests 2013-12-11 19:53:50 +04:00
svtk b178c79573 analyze function arguments after completion for unresolved and ambiguity cases 2013-11-27 14:26:36 +04:00
Svetlana Isakova 6429239f3f rewrote analyzing expression with type rhs
removed unnecessary temporary trace (and so extra 'getType' for left expression)
2013-09-03 13:09:03 +04:00
Wojciech Lopata 59716fec9c Cleanup in a test 2013-04-26 13:12:20 +04:00
Andrey Breslav 583dd1564d If t is of type T, comparison (t == null) may be true. No warning in this case 2012-10-20 23:33:50 +04:00
Svetlana Isakova 0ccdf79051 no report 'UNNECESSARY_NOT_NULL_ASSERTION' on error types 2012-09-19 15:31:17 +04:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Svetlana Isakova cd5521d6dc rename error 2012-09-07 19:03:07 +04:00
Svetlana Isakova 31831f2433 added 'class has Kotlin analog' error
to existing diagnostic tests
2012-09-05 18:55:16 +04:00
Svetlana Isakova 6d9529e826 KT-948 Make type inference work with sure()/!!
!! part fixed
2012-08-01 17:03:52 +04:00
Alexander Udalov 0c0232f42b Senseless null in when (KT-2457 frontend part) 2012-07-20 19:51:48 +04:00
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00
Alexander Udalov b2defb2cb4 KT-2317 Wrong UNNECESSARY_SAFE_CALL
#KT-2317 Fixed
2012-07-04 15:39:58 +04:00
Svetlana Isakova a66771ba42 Merge pull request #85 from udalov/kt2146
Kt2146
2012-06-22 05:23:08 -07:00
Alexander Udalov 28b150892a "!is" now works correctly in when-clauses 2012-06-22 15:51:13 +04:00
Alexander Udalov 3f4e2514ea extract DataFlowInfo from when-condition + more tests for kt2146 2012-06-22 13:18:45 +04:00
Alexander Udalov b5ba7123d5 KT-2146 Nullability casts in when.
#KT-2146 Fixed
2012-06-21 22:38:13 +04:00
Alexander Udalov d54e117b19 KT-2176 non-nullability is not inferred after !! or "as"
#KT-2176 Fixed
2012-06-21 16:46:42 +04:00
Alexander Udalov d67e22b174 KT-2223 Comparing non-null value with null might produce helpful warning
#KT-2223 Fixed
2012-06-20 20:33:58 +04:00
Alexander Udalov c613b991bf KT-2109 Nullability inference fails in extension function
#KT-2109 Fixed
2012-06-20 14:26:39 +04:00
Alexander Udalov 0734534e58 test for qualified expression nullability 2012-06-19 16:26:55 +04:00
Alexander Udalov 646451ae96 test for KT-2216 2012-06-19 16:25:03 +04:00
Alexander Udalov 85760405dc fix tests 2012-06-19 16:24:59 +04:00
Alexander Udalov 845c3198bd KT-2164 !! does not propagate nullability information 2012-06-19 16:22:43 +04:00
Nikolay Krasko 0d46b394f3 Fix test 2012-06-15 21:26:11 +04:00
Alexander Udalov c110309bab test for KT-2212
#KT-2212 Fixed
2012-06-15 20:23:07 +04:00
Svetlana Isakova 2286022307 get rid of 'internal protected' visibility 2012-06-09 19:43:53 +04:00
Svetlana Isakova 58e4157c4d KT-2234 'period!!' has type Int?
#KT-2234 fixed
2012-06-09 13:33:25 +04:00
Svetlana Isakova e05c310cdb KT-2195 error "Only safe calls are allowed ..." but it is function param (val)
#KT-2195
2012-06-08 15:27:49 +04:00
Svetlana Isakova 9e0e0e92df inlined 'getType' method without 'DataFlowInfo' parameter 2012-06-07 19:42:37 +04:00
Svetlana Isakova 7dab62ec97 KT-2125 Inconsistent error message on UNSAFE_CALL
#KT-2125 fixed
2012-05-31 14:17:48 +04:00
Stepan Koltsov 8c8ed3a1ee KT-1388 Parse static final fields from java binary classes as non-null
#KT-1388 Fixed
2012-05-13 00:53:37 +04:00
Svetlana Isakova 558d1a0e2f KT-1680 Warn if non-null variable is compared to null
#KT-1680 fixed
2012-04-19 15:36:44 +04:00
Svetlana Isakova 1fa4698611 KT-1778 Automatically cast error
#KT-1778 fixed
2012-04-18 20:42:55 +04:00
Svetlana Isakova 7863b1398e Resolve invisible references and mark them 'invisible' instead of mark them 'unresolved' 2012-04-05 18:36:46 +04:00
Svetlana Isakova 5419b0a3dc Tests fixed after visibility changing 2012-03-30 13:38:36 +04:00
Andrey Breslav 7341a82b0b Support for !! (analog of sure()/npe()) 2012-03-23 10:44:51 +01:00
Stepan Koltsov 3748507ac1 disable +JDK macro in JetDiagnosticsTest and fix (actually hide) revealed bugs
+JDK was not very helpful
2012-03-12 22:54:24 +04:00
Stepan Koltsov 07ff53d456 add trailing newlines to test files
otherwise I have to rollback dozens of files after using sed that follows conventions
2012-03-12 22:54:14 +04:00
Svetlana Isakova b35d340056 KT-1270 Poor highlighting when trying to dereference a nullable reference 2012-02-20 20:12:57 +04:00
Andrey Breslav fa5be15852 Diagnostics test data fixed 2011-12-26 19:55:29 +04:00
Andrey Breslav 41fd43b5e5 GreatSyntacticShift: Syntax for function types, function literals, when and tuples
Bug:
fun loop(var times : Int) {
   while(times > 0) {
        val u : (value : Int) -> Unit = { // This arrow is confusing the lookahead
            System.out?.println(it)
        }
        u(times--)
   }
}
2011-12-20 22:55:25 +04:00