Commit Graph

6796 Commits

Author SHA1 Message Date
Svetlana Isakova e2daefb1f3 added special method to replace type variables in constraint system 2012-07-20 19:34:54 +04:00
Svetlana Isakova fd04717ecc added 'hasErrorInConstrainingTypes'
not to report type inference error in such cases
2012-07-20 19:34:54 +04:00
Svetlana Isakova fb3c80d98c ConstraintsSystem interface changed
hasTypeConstructorMismatchAt(position) instead of getTypeConstructorMismatchConstraintPositions()
2012-07-20 19:34:53 +04:00
Svetlana Isakova c9fef98b8d added assert that constraining type doesn't contain type variables 2012-07-20 19:34:53 +04:00
Svetlana Isakova e7706a022c after rename subjectType and constraintType were exchanged 2012-07-20 19:34:53 +04:00
Svetlana Isakova 1632ec07cd moved 'checkBoundsAreSatisfied' to ConstraintsUtil 2012-07-20 19:34:53 +04:00
Svetlana Isakova ab0bc60fbd getValue, getValues methods moved to ConstraintsUtil 2012-07-20 19:34:53 +04:00
Svetlana Isakova 5e58b97f74 type constraints rollback 2012-07-20 19:34:53 +04:00
Svetlana Isakova 622e01b87b rename 2012-07-20 19:34:53 +04:00
Svetlana Isakova 3933af9964 fixes after merge 2012-07-20 19:34:53 +04:00
Svetlana Isakova b650356376 rename + extract methods 2012-07-20 19:34:53 +04:00
Svetlana Isakova b1fd3cc304 store ConstraintsBuilder in ResolvedCall
instead of type bounds map
2012-07-20 19:34:53 +04:00
Svetlana Isakova 36f3d8240c added ConstraintsUtil
some methods moved from ConstraintBuilder to ConstraintsUtil
2012-07-20 19:34:53 +04:00
Svetlana Isakova dbd3d62c54 ConstraintSystem renamed to ConstraintsBuilder 2012-07-20 19:34:53 +04:00
Svetlana Isakova f9389d2fff added TypeConstraintsImpl
containing all intermediate logic of TypeConstraints building
instead of TypeBounds
2012-07-20 19:34:53 +04:00
Svetlana Isakova d2c0329df0 add interface TypeConstraints
containing resulting lower and upper constraints
and being constraintsBuilder's result for each type parameter
2012-07-20 19:34:53 +04:00
Svetlana Isakova a4a14e9bc9 ConstraintPosition class improved 2012-07-20 19:34:53 +04:00
Svetlana Isakova 1002324ad6 regenerated diagnostics tests 2012-07-20 19:34:52 +04:00
Svetlana Isakova 3739301566 TYPE_INFERENCE_FAILED changed in tests
to concrete type inference error
2012-07-20 19:34:52 +04:00
Svetlana Isakova f2e8f8c9c5 changed to right way to check
type inference error presence
2012-07-20 19:34:52 +04:00
Svetlana Isakova 0394da053d added assert for last type inference error type
restructured 'isSuccessful' method of constraint system:
!hasTypeConstructorMismatch && !hasUnknownParameters && !hasConflictingParameters
to correspond with type inference errors
2012-07-20 19:34:52 +04:00
Svetlana Isakova 33c25ea01f renamed COMPACT DescriptorRenderer
to COMPACT_WITH_MODIFIERS;
COMPACT renders descriptor without modifiers
2012-07-20 19:34:52 +04:00
Svetlana Isakova b3146fa42f added default renderers for type inference errors
TabledDescriptorRenderer is responsible for rendering messages with tables (in compiler);
HtmlTabledDescriptorRenderer changes rendering in ide using html tables
2012-07-20 19:34:52 +04:00
Svetlana Isakova ee5ec0b500 added ide renderers for type inference errors 2012-07-20 19:34:52 +04:00
Svetlana Isakova 685254d469 added TablesRenderer
to render ide error messages with html tables
2012-07-20 19:34:52 +04:00
Svetlana Isakova 95634f3307 added 'dependsOnTypeParameters' method
to filter value parameters dependent on type parameters
2012-07-20 19:34:52 +04:00
Svetlana Isakova b60bb9eb29 added constraint position argument 2012-07-20 19:34:52 +04:00
Svetlana Isakova 31e5e9e9ef 'typeInferenceFailed' method removed from TracingStrategy
(it might be reported at the end of resolution process, when there is no tracing)
2012-07-20 19:34:52 +04:00
Svetlana Isakova 62d5855d74 ConstraintSystem interface enhancement
to be used by error reporting
2012-07-20 19:34:52 +04:00
Svetlana Isakova d7de3973d9 type inference errors report changed 2012-07-20 19:34:52 +04:00
Svetlana Isakova 73c1db571c added ConstraintPosition
for accurate error reporting
2012-07-20 19:34:52 +04:00
Svetlana Isakova e1da9161a3 added InferenceErrorData class
to provide information to renderers about type inference errors
2012-07-20 19:34:52 +04:00
Svetlana Isakova 58824fb38b added more specialized errors than type inference error 2012-07-20 19:34:52 +04:00
Svetlana Isakova 42d9e3cbf9 ide renderers were moved to separate class 2012-07-20 19:34:51 +04:00
Svetlana Isakova eb82eba121 tests for type inference
#KT-1800 fixed
 #KT-1029 fixed
 #KT-1031 fixed
 #KT-1558 fixed
 #KT-1944 fixed
 #KT-2179 fixed
 #KT-2294 fixed
 #KT-2320 fixed
 #KT-2324 fixed
2012-07-20 19:34:51 +04:00
Svetlana Isakova e77cc82afd new constraint system instead of old is used 2012-07-20 19:34:51 +04:00
Svetlana Isakova 1df826093a type inference error shouldn't influence on coercion to Unit 2012-07-20 19:34:51 +04:00
Svetlana Isakova b2923f1ed0 not to report errors if expected type is DONT_CARE 2012-07-20 19:34:51 +04:00
Svetlana Isakova 1c682a648a TYPE_INFERENCE_UPPER_BOUND_VIOLATED error added 2012-07-20 19:34:51 +04:00
Svetlana Isakova 7c88a70c51 'hasUnknownTypeParameters' method added
to detect 'DIRTY' status
2012-07-20 19:34:51 +04:00
Svetlana Isakova 7696b1cb7c TYPE_INFERENCE_ERROR resolution status added
if type inference failed, we don't want to return type with unsubstituted type parameters (like List<T>),
so in this case we return error type
2012-07-20 19:34:51 +04:00
Svetlana Isakova 2eece73df9 'DIRTY' resolution result code added
it means there are some candidates with unknown type parameters that need inference completion
2012-07-20 19:34:51 +04:00
Svetlana Isakova e89a09f470 'isFunctionLiteralWithoutDeclaredParameterTypes' added
such literals are analyzed at the end of inference without initial influence on the constraint system
2012-07-20 19:34:51 +04:00
Svetlana Isakova f270f9e90a inference using new constraint system
final type parameters inference and substitution are made after expected type is known (should be redone with caches for performance)
2012-07-20 19:34:51 +04:00
Svetlana Isakova 83ec7d9c68 old constraint system is not removed for a while 2012-07-20 19:34:51 +04:00
Svetlana Isakova 2193a2f7c1 new constraint system for type inference added 2012-07-20 19:34:51 +04:00
Andrey Breslav bc6c8e980e Module scripts are compiled in an environment with JDK & Annotations 2012-07-20 19:29:46 +04:00
Pavel V. Talanov 39edcda317 KT-2227 Call to toString missing when interpolating string literal.
Test only.

 #KT-2227
2012-07-20 18:57:37 +04:00
Pavel V. Talanov d3933bcc3f KT-2370: foo.equals(bar) doesn't compile in JS.
Only test.

  #KT-2370
2012-07-20 18:50:32 +04:00
Pavel V. Talanov f861b69d7a Deal with cases when different visibility of overridden members could produce incorrect fake override.
(by Pavel Talanov and Andrey Breslav)
2012-07-20 18:31:05 +04:00