Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don’t require a newline after a type mismatch error reported by the compiler #1165

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

julienrf
Copy link
Contributor

Currently, the compiler incorrectly reports errors like:

[error]  val n: Int = 0;  val s: Int = n + "hello"
[error]                               ^
[error]  Found:    String
[error]  Required: Int
[error]
[error]  One of the following imports might make progress towards fixing the problem:
[error]
[error]    import org.specs2.io.FileName.ToFileName
[error]    import org.specs2.TimeoutSpecExample.asExecutionIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asExecutionIsInterpolated
[error]    import org.specs2.reporter.reporterSpecSupport.asExecutionIsInterpolated
[error]    import org.specs2.runner.RunnerSpecification.asExecutionIsInterpolated
[error]    import org.specs2.specification.S1.asExecutionIsInterpolated
[error]    import org.specs2.specification.S2.asExecutionIsInterpolated
[error]    import org.specs2.specification.dsl1.asExecutionIsInterpolated
[error]    import org.specs2.TimeoutSpecExample.asResultIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asResultIsInterpolated

But after scala/scala3#17924 is merged, the import suggestions will be removed from the output.

We adjust the test specification in TypecheckSpec to pass both with the current compiler and with the fix in the linked PR.

…ompiler

Currently, the compiler incorrectly reports errors like:

~~~ text
[error]  val n: Int = 0;  val s: Int = n + "hello"
[error]                               ^
[error]  Found:    String
[error]  Required: Int
[error]
[error]  One of the following imports might make progress towards fixing the problem:
[error]
[error]    import org.specs2.io.FileName.ToFileName
[error]    import org.specs2.TimeoutSpecExample.asExecutionIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asExecutionIsInterpolated
[error]    import org.specs2.reporter.reporterSpecSupport.asExecutionIsInterpolated
[error]    import org.specs2.runner.RunnerSpecification.asExecutionIsInterpolated
[error]    import org.specs2.specification.S1.asExecutionIsInterpolated
[error]    import org.specs2.specification.S2.asExecutionIsInterpolated
[error]    import org.specs2.specification.dsl1.asExecutionIsInterpolated
[error]    import org.specs2.TimeoutSpecExample.asResultIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asResultIsInterpolated
~~~

But after scala/scala3#17924 is merged, the import suggestions will be removed from the output.

We adjust the test specification in TypecheckSpec to pass both with the current compiler and with the fix in the linked PR.
@etorreborre etorreborre merged commit e46ff69 into etorreborre:main Jun 14, 2023
@etorreborre
Copy link
Owner

Thanks @julienrf!

@julienrf julienrf deleted the relaxed-messages branch June 14, 2023 08:15
julienrf added a commit to dotty-staging/specs2 that referenced this pull request Jun 14, 2023
…ompiler (etorreborre#1165)

Currently, the compiler incorrectly reports errors like:

~~~ text
[error]  val n: Int = 0;  val s: Int = n + "hello"
[error]                               ^
[error]  Found:    String
[error]  Required: Int
[error]
[error]  One of the following imports might make progress towards fixing the problem:
[error]
[error]    import org.specs2.io.FileName.ToFileName
[error]    import org.specs2.TimeoutSpecExample.asExecutionIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asExecutionIsInterpolated
[error]    import org.specs2.reporter.reporterSpecSupport.asExecutionIsInterpolated
[error]    import org.specs2.runner.RunnerSpecification.asExecutionIsInterpolated
[error]    import org.specs2.specification.S1.asExecutionIsInterpolated
[error]    import org.specs2.specification.S2.asExecutionIsInterpolated
[error]    import org.specs2.specification.dsl1.asExecutionIsInterpolated
[error]    import org.specs2.TimeoutSpecExample.asResultIsInterpolated
[error]    import org.specs2.reflect.FromObjectName.asResultIsInterpolated
~~~

But after scala/scala3#17924 is merged, the import suggestions will be removed from the output.

We adjust the test specification in TypecheckSpec to pass both with the current compiler and with the fix in the linked PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants