KT-1519: Error calling native extension function from user defined extension function.

This commit is contained in:
pTalanov
2012-03-13 15:17:36 +04:00
parent 15437cbbf6
commit 8b984551c1
6 changed files with 76 additions and 5 deletions
@@ -0,0 +1,19 @@
package foo
native
class Wow() {
val x : Int = js.noImpl
val y : Int = js.noImpl
}
native
fun Wow.sum() : Int = js.noImpl
fun Wow.dblSum() : Int {
return 2 * sum()
}
fun box() : Boolean {
return (Wow().dblSum() == 6)
}
@@ -0,0 +1,24 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function Wow() {
this.x = 1;
this.y = 2;
}
Wow.prototype.sum = function() {
return this.x + this.y;
};