compiler, runtime: Refactor P4Type to P4QualifiedType
Also, refer to the different pieces of the qualified type as qualifiers and not attributes. Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -312,7 +312,7 @@ extension ReturnStatement: CompilableStatement {
|
||||
|
||||
return switch Expression.Compile(node: expression_node, withContext: context) {
|
||||
case .Ok(let result):
|
||||
if result.type().dataType().eq(rhs: context.expected_type!.dataType()) {
|
||||
if result.type().baseType().eq(rhs: context.expected_type!.baseType()) {
|
||||
.Ok((ReturnStatement(result), context))
|
||||
} else {
|
||||
.Error(
|
||||
|
||||
Reference in New Issue
Block a user