Bug 146401 - Option Compatible negates unknown datatype check
Summary: Option Compatible negates unknown datatype check
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-24 06:49 UTC by Leslie
Modified: 2024-01-24 22:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
small code showing bug (8.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-12-24 06:51 UTC, Leslie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leslie 2021-12-24 06:49:50 UTC
Description:
Enabling Option Compatible in a module negates the unknown data type check.  
The given the code well error "unknown datatype":
'option compatible 

sub test() 
	dim n as not_a_valid_datatype
end sub 

Enabling Option Compatible and the interpreter doesn't complain about the datatype. 
XRay shows n as "no data(null)" 



Steps to Reproduce:
1.enable option compatible in a basic module
2.define a variable as a nonexistent type
3.run and see no error message

Actual Results:
No error shows

Expected Results:
Invalid Datatype Error should show


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.3.2 (x64) / LibreOffice Community
Build ID: d166454616c1632304285822f9c83ce2e660fd92
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Leslie 2021-12-24 06:51:04 UTC
Created attachment 177120 [details]
small code showing bug
Comment 2 Mike Kaganski 2021-12-24 07:12:17 UTC
Also repro using OOo 3.2.0.
Comment 3 Rafael Lima 2022-06-08 14:16:29 UTC
Still repro in 

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 0f70f4d76b5f68e5b1d81f0e300435ccef893c9a
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL

FYI Adding the keyword New as shown below returns a runtime error. Not detected at compile time both with/without 'Option Compatible'.

Sub TestType
    Dim a As New NoTypeAtAll
End Sub