From 8711de89810f1cd6782d98e0e4745c30532a77ac Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 10 Jan 2016 17:52:18 +0000 Subject: Support type literals in the backends --- src/main/java/org/zwobble/couscous/values/TypeValue.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/zwobble/couscous/values') diff --git a/src/main/java/org/zwobble/couscous/values/TypeValue.java b/src/main/java/org/zwobble/couscous/values/TypeValue.java index 43dfc33..269839a 100644 --- a/src/main/java/org/zwobble/couscous/values/TypeValue.java +++ b/src/main/java/org/zwobble/couscous/values/TypeValue.java @@ -3,10 +3,14 @@ package org.zwobble.couscous.values; import org.zwobble.couscous.ast.TypeName; public class TypeValue implements PrimitiveValue { - private final TypeName type; + private final TypeName value; - public TypeValue(TypeName type) { - this.type = type; + public TypeValue(TypeName value) { + this.value = value; + } + + public TypeName getValue() { + return value; } @Override @@ -22,7 +26,7 @@ public class TypeValue implements PrimitiveValue { @Override public String toString() { return "TypeValue(" + - "type=" + type + + "value=" + value + ')'; } @@ -33,12 +37,12 @@ public class TypeValue implements PrimitiveValue { TypeValue typeValue = (TypeValue) o; - return type.equals(typeValue.type); + return value.equals(typeValue.value); } @Override public int hashCode() { - return type.hashCode(); + return value.hashCode(); } } -- cgit v1.2.3