diff options
author | 2011-05-31 22:19:16 -0700 | |
---|---|---|
committer | 2011-05-31 22:19:16 -0700 | |
commit | dd6e3950c54ff581c7ceafdd82647365c9cdf9b3 (patch) | |
tree | fe81d69692a497c3c74d44486e0996b1a9673a27 | |
parent | 522ddf6ac39c150e52753b0f2982593796b39eb3 (diff) |
fixed a bug in translation of generics
-rw-r--r-- | BCT/BytecodeTranslator/ExpressionTraverser.cs | 2 | ||||
-rw-r--r-- | BCT/BytecodeTranslator/Sink.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/BCT/BytecodeTranslator/ExpressionTraverser.cs b/BCT/BytecodeTranslator/ExpressionTraverser.cs index 2aab5209..9930c3c9 100644 --- a/BCT/BytecodeTranslator/ExpressionTraverser.cs +++ b/BCT/BytecodeTranslator/ExpressionTraverser.cs @@ -620,7 +620,7 @@ namespace BytecodeTranslator var translateAsFunctionCall = proc is Bpl.Function;
if (!translateAsFunctionCall) {
if (resolvedMethod.Type.ResolvedType.TypeCode != PrimitiveTypeCode.Void) {
- Bpl.Variable v = this.sink.CreateFreshLocal(resolvedMethod.Type.ResolvedType);
+ Bpl.Variable v = this.sink.CreateFreshLocal(methodToCall.ResolvedMethod.Type.ResolvedType);
Bpl.IdentifierExpr unboxed = new Bpl.IdentifierExpr(token, v);
if (resolvedMethod.Type is IGenericTypeParameter) {
Bpl.IdentifierExpr boxed = Bpl.Expr.Ident(this.sink.CreateFreshLocal(this.sink.Heap.BoxType));
diff --git a/BCT/BytecodeTranslator/Sink.cs b/BCT/BytecodeTranslator/Sink.cs index 127317e9..6bde28ec 100644 --- a/BCT/BytecodeTranslator/Sink.cs +++ b/BCT/BytecodeTranslator/Sink.cs @@ -600,8 +600,8 @@ namespace BytecodeTranslator { // also, should it return true for properties and all of the other things the tools
// consider pure?
private bool IsPure(IMethodDefinition method) {
- bool isPropertyGetter = method.IsSpecialName && method.Name.Value.StartsWith("get_");
- if (isPropertyGetter) return true;
+ //bool isPropertyGetter = method.IsSpecialName && method.Name.Value.StartsWith("get_");
+ //if (isPropertyGetter) return true;
foreach (var a in method.Attributes) {
if (TypeHelper.GetTypeName(a.Type).EndsWith("PureAttribute")) {
|