comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteGroupingTest.java @ 20984:6361fa2e3321

Truffle-DSL: further fixes for polymorphic execute signatures.
author Christian Humer <christian.humer@oracle.com>
date Wed, 15 Apr 2015 21:13:43 +0200
parents 476374f3fe9a
children b1530a6cce8c
comparison
equal deleted inserted replaced
20983:b99da6d86cfe 20984:6361fa2e3321
142 public int executeInt() { 142 public int executeInt() {
143 return 42; 143 return 42;
144 } 144 }
145 145
146 @Specialization(rewriteOn = RuntimeException.class) 146 @Specialization(rewriteOn = RuntimeException.class)
147 int s1() { 147 double s1() {
148 return 42; 148 return 42;
149 } 149 }
150 150
151 @Specialization 151 @Specialization
152 int s2() { 152 double s2() {
153 return 42; 153 return 42;
154 } 154 }
155 155
156 } 156 }
157 157
158 @ExpectError("Incompatible abstract execute methods found [executeDouble(), executeInt()].%") 158 @ExpectError("Incompatible abstract execute methods found %")
159 abstract static class IncompatibleAbstract1 extends Node { 159 abstract static class IncompatibleAbstract1 extends Node {
160 160
161 // we don't know how to implement executeDouble 161 // we don't know how to implement executeDouble
162 abstract double executeDouble(); 162 abstract double executeDouble();
163 163
164 abstract int executeInt(); 164 abstract int executeInt();
165 165
166 @Specialization 166 @Specialization
167 int s1() { 167 double s1() {
168 return 42; 168 return 42;
169 } 169 }
170 170
171 } 171 }
172 172