Summary: | Array with an element type should not be assignable to a variable of Array with another element type | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | himajin100000 |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | oliver.brinzing |
Priority: | medium | ||
Version: | Inherited From OOo | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=123025 | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 127592 | ||
Attachments: | document to be used in STR |
Description
himajin100000
2019-02-08 11:46:52 UTC
Created attachment 149023 [details]
document to be used in STR
reproducible, assignment b=a changes vartype to String I did some tests on Excel VBA. And I was so surprised at how I was misunderstanding Excel VBA. (please note that the post to LibreOffice Dev ML has been done before these tests. Also note that VB.NET MAY WORK IN DIFFERENT WAY) ’---Excel VBA--- Option Explicit Sub Main() Dim a(1) As Integer Dim b() As Integer b = a End Sub ’---------------- => No Error ’---Excel VBA--- Sub Main() Dim a(1) As Integer Dim b(1) As Integer b = a End Sub ’---------------- => Error ’---Excel VBA--- Sub Main() Dim a() As Integer Dim b() As Integer b = a End Sub ’---------------- => No Error ’---Excel VBA--- Sub Main() Dim a() As Integer Dim b As Variant b = a End Sub ’------------------ => No Error ’---Excel VBA--- Sub Main() Dim a() As Integer Hoge (a) End Sub Function Hoge(x() As Integer) As String Hoge = "abc" End Function ’------------------ => Error ’---Excel VBA--- Sub Main() Dim a() As Integer Hoge (a) End Sub Function Hoge(x As Variant) As String Hoge = "abc" End Function ’------------------ => No Error ’---Excel VBA--- Sub Main() Dim a() As Integer Dim b As Integer Dim c As Variant c = a c = b End Sub ’------------------ => No Error ’---Excel VBA--- Sub Main() Dim a() As Integer Hoge (a) End Sub Function Hoge(x As Variant) As String Dim b() As Integer b = x Hoge = "abc" End Function ’------------------ => No Error ’---Excel VBA--- Sub Main() Dim a() As Integer Hoge (a) End Sub Function Hoge(x As Variant) As String Dim b() As String b = x Hoge = "abc" End Function ’------------------ => Error Function parameter's one was compile error typo:
>Function parameter's one was compile error
Error in 'Function Hoge(x() As Integer) As String' case was a compile error
Sub hoge() Dim a(2) As Integer Dim b() As Integer a(0) = 1 a(1) = 2 b = a a(0) = 3 MsgBox (b(0)) End Sub ------------- StarBasic => 3 Excel VBA => 1 FYI: '-----StarBasic----- Sub Main() Dim a(1) As Integer Dim b() As Integer a(0) = 1 a(1) = 2 b = a Redim Preserve b(2) As Integer a(0) = 5 Msgbox(b(0)) End Sub '----------------------- =>1 Dear himajin100000, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug Dear himajin100000, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug |