mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
disable dereferencing error for now
This commit is contained in:
parent
aea5b2e3b6
commit
3c4bb16ce9
@ -1481,9 +1481,11 @@ fn (p mut Parser) get_var_type(name string, is_ptr bool, is_deref bool) string {
|
|||||||
mut typ := p.var_expr(v)
|
mut typ := p.var_expr(v)
|
||||||
// *var
|
// *var
|
||||||
if is_deref {
|
if is_deref {
|
||||||
|
/*
|
||||||
if !p.inside_unsafe {
|
if !p.inside_unsafe {
|
||||||
p.error('dereferencing can only be done inside an `unsafe` block')
|
p.error('dereferencing can only be done inside an `unsafe` block')
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if !typ.contains('*') && !typ.ends_with('ptr') {
|
if !typ.contains('*') && !typ.ends_with('ptr') {
|
||||||
println('name="$name", t=$v.typ')
|
println('name="$name", t=$v.typ')
|
||||||
p.error('dereferencing requires a pointer, but got `$typ`')
|
p.error('dereferencing requires a pointer, but got `$typ`')
|
||||||
|
Loading…
Reference in New Issue
Block a user