From a979c7e1d77a64bdb66e122915575f4c43f3d0ea Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Sat, 23 Jul 2016 21:18:00 +0200 Subject: [PATCH] ugly fix for failing tests. without the string template, KotlinFilePathReferenceContributor injects a file reference into the string literal, and an unrelated intention (AddAnnotationIntention) tries to resolve it. resolving the reference caches the default contexts in FIleReferenceSet, which caches the order entries of a module in an OrderRootsCache. this creates VirtualFilePointers which are for some reason not disposed properly. --- .../createFromUsage/createFunction/call/argumentTypeMismatch.kt | 2 +- .../createFunction/call/argumentTypeMismatch.kt.after | 2 +- .../createSecondaryConstructor/argumentTypeMismatch.kt | 2 +- .../createSecondaryConstructor/argumentTypeMismatch.kt.after | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt index fe873a72743..0addb3e473c 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt @@ -2,5 +2,5 @@ fun foo(n: Int) {} fun test() { - foo("abc") + foo("abc${1}") } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt.after index 4225a8b12b1..9c6ba74bfd3 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt.after @@ -2,7 +2,7 @@ fun foo(n: Int) {} fun test() { - foo("abc") + foo("abc${1}") } fun foo(n: String) { diff --git a/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt b/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt index f2c88815fd0..3a398a2f386 100644 --- a/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt +++ b/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt @@ -3,5 +3,5 @@ class Foo(val n: Int) fun test() { - val foo = Foo("abc") + val foo = Foo("abc${1}") } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt.after b/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt.after index b3bd9a06113..1779d2bc5ad 100644 --- a/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt.after +++ b/idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt.after @@ -5,5 +5,5 @@ class Foo(val n: Int) { } fun test() { - val foo = Foo("abc") + val foo = Foo("abc${1}") } \ No newline at end of file