Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ArrayTest.java @ 18782:3ea386a1036f
Truffle-DSL: breaking: @TypeCheck and @TypeCast now require casted/checked type as explicit parameter. Previously the type was parsed from the method name. (GRAAL-446 #resolve)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 20:23:22 +0100 |
parents | 7fab6f106989 |
children | 18c0f02fa4d2 |
comparison
equal
deleted
inserted
replaced
18781:941761f6b736 | 18782:3ea386a1036f |
---|---|
107 newArray[i] = array[i]; | 107 newArray[i] = array[i]; |
108 } | 108 } |
109 return newArray; | 109 return newArray; |
110 } | 110 } |
111 | 111 |
112 @TypeCheck | 112 @TypeCheck(int[].class) |
113 public static boolean isIntArray(Object array) { | 113 public static boolean isIntArray2(Object array) { |
114 return array instanceof int[]; | 114 return array instanceof int[]; |
115 } | 115 } |
116 | 116 |
117 @TypeCast | 117 @TypeCast(int[].class) |
118 public static int[] asIntArray(Object array) { | 118 public static int[] asIntArray(Object array) { |
119 return (int[]) array; | 119 return (int[]) array; |
120 } | 120 } |
121 | 121 |
122 } | 122 } |