Skip to content

Commit

Permalink
Infer INSERT INTO AS
Browse files Browse the repository at this point in the history
  • Loading branch information
emk committed Oct 30, 2023
1 parent a7b7d58 commit 359555f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ impl InferTypes for ast::InsertIntoStatement {
}
Ok(((), scope.clone()))
}
ast::InsertedData::Select { query, .. } => Err(nyi(query, "INSERT INTO .. AS")),
ast::InsertedData::Select { query, .. } => {
let (ty, _scope) = query.infer_types(scope)?;
ty.expect_subtype_ignoring_nullability_of(table_type, query)?;
Ok(((), scope.clone()))
}
}
}
}
Expand Down

0 comments on commit 359555f

Please sign in to comment.