Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] compiler, syntax, database: Error messages

  • Loading branch information...
commit 518c6000bf4d6b5a22759669a94f2b7bdbc98c94 1 parent f74a501
@BourgerieQuentin BourgerieQuentin authored
View
4 libqmlcompil/dbGen/dbGen_private.ml
@@ -1893,7 +1893,9 @@ module CodeGenerator ( Arg : DbGenByPass.S ) = struct
| `virtualset (_, wty, true, record) ->
let record = match record with
| Some record -> record
- | None -> assert false
+ | None ->
+ QmlError.error context
+ "This kind of dbset access is not yet implemented by Db3"
in
make_virtualset_partialpath db_def.Schema_private.schema dbinfo gamma node path kind wty record
| `virtualpath (ident, rty, wty) ->
View
4 libqmlcompil/dbGen/schema_private.ml
@@ -1142,7 +1142,9 @@ let preprocess_kind ~context gamma kind ty virtual_ =
match ty with
| Q.TypeName ([param], name) when Q.TypeIdent.to_string name = "list" ->
coerce e param
- | _ -> assert false
+ | _ ->
+ QmlError.error context "You use a database update operator which performs on 'list', but you used it on a path of '%a'"
+ QmlPrint.pp#ty ty
in
let rec update (ty:QmlAst.ty) u =
let error fmt0 fmt =
View
4 opalang/classic_syntax/parser_path.trx
@@ -99,10 +99,10 @@ update_list <-
{{ QmlAst.Db.UAppend e }}
/ (=Opa_lexer.exact_symbol("<++")) spacing Opa_parser.expr:e
{{ QmlAst.Db.UAppendAll e }}
- / (=Opa_lexer.exact_symbol("+>")) spacing Opa_parser.expr:e
+(* / (=Opa_lexer.exact_symbol("+>")) spacing Opa_parser.expr:e
{{ QmlAst.Db.UPrepend e }}
/ (=Opa_lexer.exact_symbol("++>")) spacing Opa_parser.expr:e
- {{ QmlAst.Db.UPrependAll e }}
+ {{ QmlAst.Db.UPrependAll e }} *)
/ (=Opa_lexer.exact_ident("pop")) {{ QmlAst.Db.UPop }}
/ (=Opa_lexer.exact_ident("shift")) {{ QmlAst.Db.UShift }}
Please sign in to comment.
Something went wrong with that request. Please try again.