summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-06 19:24:20 +0200
committerJose <jose@zeroc.com>2019-06-06 19:24:20 +0200
commit2dc0a8799e913bb37db8c5895f00f4dda920df62 (patch)
tree6dd9fe720314d92fecedb703132c5cf73082ca3f /ruby
parentDo not set WindowsTargetPlatformVersion, use the default (diff)
downloadice-2dc0a8799e913bb37db8c5895f00f4dda920df62.tar.bz2
ice-2dc0a8799e913bb37db8c5895f00f4dda920df62.tar.xz
ice-2dc0a8799e913bb37db8c5895f00f4dda920df62.zip
Fix Incorrect generated code for class implements interface
Close #406
Diffstat (limited to 'ruby')
-rw-r--r--ruby/test/Ice/operations/AllTests.rb6
-rw-r--r--ruby/test/Ice/operations/Test.ice25
-rw-r--r--ruby/test/Ice/operations/Twoways.rb5
3 files changed, 33 insertions, 3 deletions
diff --git a/ruby/test/Ice/operations/AllTests.rb b/ruby/test/Ice/operations/AllTests.rb
index eef08818c13..ffc8bc176cc 100644
--- a/ruby/test/Ice/operations/AllTests.rb
+++ b/ruby/test/Ice/operations/AllTests.rb
@@ -11,10 +11,12 @@ def allTests(helper, communicator)
cl = Test::MyClassPrx::checkedCast(base)
derived = Test::MyDerivedClassPrx::checkedCast(cl)
+ bprx = M::BPrx::checkedCast(communicator.stringToProxy("b:#{helper.getTestEndpoint()}"))
+
print "testing twoway operations... "
STDOUT.flush
- twoways(helper, communicator, cl)
- twoways(helper, communicator, derived)
+ twoways(helper, communicator, cl, bprx)
+ twoways(helper, communicator, derived, bprx)
derived.opDerived()
puts "ok"
diff --git a/ruby/test/Ice/operations/Test.ice b/ruby/test/Ice/operations/Test.ice
index 2cd152f9ac2..3db80516d59 100644
--- a/ruby/test/Ice/operations/Test.ice
+++ b/ruby/test/Ice/operations/Test.ice
@@ -6,6 +6,8 @@
#include <Ice/Current.ice>
+[["suppress-warning:deprecated"]] // For classes with operations
+
module Test
{
@@ -359,3 +361,26 @@ interface MyDerivedClass extends Test::MyClass
}
}
+
+//
+// Test proxy inheritance for class with operations
+// see: https://github.com/zeroc-ice/ice/issues/406
+//
+module M
+{
+ class A
+ {
+ int x;
+ // void opA();
+ }
+
+ interface Intf
+ {
+ void opIntf();
+ }
+
+ class B extends A implements Intf
+ {
+ void opB();
+ }
+}
diff --git a/ruby/test/Ice/operations/Twoways.rb b/ruby/test/Ice/operations/Twoways.rb
index 73c3d30603f..66253fa80dd 100644
--- a/ruby/test/Ice/operations/Twoways.rb
+++ b/ruby/test/Ice/operations/Twoways.rb
@@ -3,7 +3,7 @@
# Copyright (c) ZeroC, Inc. All rights reserved.
#
-def twoways(helper, communicator, p)
+def twoways(helper, communicator, p, bprx)
literals = p.opStringLiterals();
@@ -1266,4 +1266,7 @@ def twoways(helper, communicator, p)
ic.destroy()
end
+
+ bprx.opB()
+ bprx.opIntf()
end